sempdf
sempdf v1.9.1Interfaces

Interface: ImageFitOptions

sempdf v1.9.1


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

Properties

PropertyTypeDescriptionInherited fromDefined in
artifactSubtype?"Header" | "Footer" | "Watermark"Optional artifact subtype, such as Header, Footer, or Watermark.ArtifactOptions.artifactSubtypesrc/types.ts:379
artifactType?"Pagination" | "Layout" | "Page"Artifact type written to the marked-content property dictionary.ArtifactOptions.artifactTypesrc/types.ts:377
clip?ImageClipClip 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?ImageFitHow 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?ImagePositionAlignment within the box when fit leaves slack or overflow. Defaults to "center".-src/types.ts:2736

On this page