sempdf v1.9.1Interfaces
Interface: ImageFitOptions
sempdf / ImageFitOptions
Defined in: src/types.ts:2727
Fit, positioning, and clipping controls shared by all raster image
placements. The image is always laid out inside its width×height box.
Extends
ArtifactOptions
Extended by
BmpImageOptionsGifImageOptionsJbig2ImageOptionsJpegImageOptionsJp2ImageOptionsPngImageOptionsTiffImageOptionsWebpImageOptions
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
artifactSubtype? | "Header" | "Footer" | "Watermark" | Optional artifact subtype, such as Header, Footer, or Watermark. | ArtifactOptions.artifactSubtype | src/types.ts:379 |
artifactType? | "Pagination" | "Layout" | "Page" | Artifact type written to the marked-content property dictionary. | ArtifactOptions.artifactType | src/types.ts:377 |
clip? | ImageClip | Clip the image to a shape inscribed in its box: "ellipse" fills the box, "circle" uses the smaller box dimension (centered). Defaults to "none". | - | src/types.ts:2741 |
fit? | ImageFit | How the image fills its box: - "fill" (default) — stretch to the box, ignoring aspect ratio. - "contain" — scale to fit inside the box, preserving aspect (letterboxed). - "cover" — scale to cover the box, preserving aspect (overflow cropped). | - | src/types.ts:2734 |
position? | ImagePosition | Alignment within the box when fit leaves slack or overflow. Defaults to "center". | - | src/types.ts:2736 |