Type Alias: ThumbnailOptions
ThumbnailOptions =
object
Options for configuring thumbnail generation.
Properties
format?
optionalformat:"png"|"jpeg"
Image format for the thumbnail. Supported formats are ‘png’ and ‘jpeg’. By default, thumbnails will be generated in ‘png’ format.
height?
optionalheight:number
Height of the thumbnail in pixels. By default, thumbnails will have a height of 100 pixels.
onThumbnail()?
optionalonThumbnail: (thumbnail,pageNumber) =>void
Callback fired for each thumbnail as it loads. Used for progressive rendering.
Only applicable when using getThumbnails() method.
Parameters
thumbnail
HTMLImageElement
pageNumber
number
Returns
void
quality?
optionalquality:number
Quality for JPEG format. Only applies when format is ‘jpeg’. Value should be between 0 and 1, where 1 is the highest quality. By default, the quality will be set to 0.92.
signal?
optionalsignal:AbortSignal
AbortSignal to cancel thumbnail generation.
Only applicable when using getThumbnails() method.
width?
optionalwidth:number
Width of the thumbnail in pixels. By default, thumbnails will have a width of 100 pixels.