Type Alias PDFToIMGOptions

PDFToIMGOptions: {
    includeBufferContent?: boolean;
    outputFileName?: string;
    outputFolderName?: string;
    pages?: number[];
    type?: ImageType;
    viewportScale?: number;
}

The options of images rendering.

Type declaration

  • OptionalincludeBufferContent?: boolean

    Include the buffer content in the response, increase the response weight. Set this option to true if you want to reuse the Buffer content of the image.

    false
    
  • OptionaloutputFileName?: string

    The name of the image file.

    undefined
    
  • OptionaloutputFolderName?: string

    The name of the folder where images will be rendered. Pass __dirname if you wish to have the images at same level.

    undefined
    
  • Optionalpages?: number[]

    An array containing the pages to render. Any index not contained in the pdf file will be skipped. The first page is 1.

    undefined
    
  • Optionaltype?: ImageType

    Choose between PNG, JPEG, WEBP.

    JPEG
    
  • OptionalviewportScale?: number

    Controls scaling (+- equivalent to zooming). Increasing scale increases quality, size and time to render the images.

    1