[]
        
(Showing Draft Content)

ImageOptions

DsPdfJS API v9.1.0


DsPdfJS API / ImageOptions

Type Alias: ImageOptions

ImageOptions = object

Represents options controlling how native images are processed when inserted in a PDF file.

Properties

alphaThreshold?

optional alphaThreshold: number

Gets or sets the alpha threshold value. If all pixels of an image with the alpha channel have alpha values greater than or equal to this value, the alpha channel will not be saved, thus making the image and the whole PDF smaller. The default is 0xFF (i.e. all transparency is preserved). Not specified means 0xFF.


compressColors?

optional compressColors: boolean

Gets or sets a value indicating whether to apply a slight compression to color values. Unlike JPEG, this preserves transparency while still reducing the image size. The default is false.


format?

optional format: PdfImageFormat

Gets or sets the format to use when saving images. Not specified means "Auto".

jpegQuality?

optional jpegQuality: number

Gets or sets the JPEG image quality, in percent. This value must be between 0 (lowest quality, maximum compression) to 100 (highest quality, no compression). Not specified means 75.