Optional
position: numberOptional
attributes?: { author?: string; creator?: string; title?: string; subject?: string; keywords?: string; _marker?: () => void; }new PdfAttributes({});
Optional
dpi?: numberThe dpi
parameter has two different meanings depending on the value of pageSize
and
pageFit
. If pageSize is CUSTOM or pageFit is NONE, then dpi
is the conversion ratio used
to convert from units of pixels to physical inches when adding bitmap images (JPEG, PNG, or
raw) to the PDF. Otherwise, if resamplingMethod
is not NONE, then the image is downscaled
if necessary (if the image after being fit to the page has a higher calculated DPI than
dpi
) to match dpi
before adding it to the PDF. Otherwise, the setting is ignored and the
calculated image DPI is used instead.
72;
Optional
jpegJPEG quality for images.
Applies if an image is added as a cv::Mat and therefore needs to be encoded.
Also applies if resamplingMethod
not NONE and the image being added needs to be
downscaled. Otherwise, when adding JPEG files to the PDF, the files are copied directly into
the PDF and not re-encoded, which is many times faster and also preserves the quality of the
original.
80;
Optional
pagePage direction.
"PORTRAIT";
Optional
pageHow to fit the image into the page. Only used if pageSize
is not CUSTOM
.
The image can either be stretched to fill the page,
in one of three ways, or centered on the page without stretching.
"FIT_IN";
Optional
pagePhysical size of the page. If CUSTOM, the page size will be set as the image size at given dpi.
"A4";
Optional
resamplingResampling method.
"NONE";
Optional
generatorOptions: { Optional
binarizationFilter to apply to the input image when adding pages with binarization. If set, the filter is applied to the input image and the resulting image is stored as a 1-bit TIFF. When storing documents it's typically best to use the BINARY_DOCUMENT_OPTIMIZED_COMPRESSION compression mode (CCITTFAX4) instead of the default, as it tends to produce the smallest file sizes. If not set, simple thresholding is applied to the image, instead.
null;
Optional
compression?: CompressionModeCompression.
"LZW";
Optional
dpi?: numberDPI value.
72;
Optional
jpegJPEG quality (TIFFTAG_JPEGQUALITY). Values range from 0 to 100.
80;
Optional
userUser-defined fields.
[];
Optional
zipZIP/Deflate compression level (TIFFTAG_ZIPQUALITY). Values range from 1 to 9.
6;
Optional
pageOptions: Omit<TiffPageOptions, "consumeImage">Static
loadGenerated using TypeDoc
Attributes.