Interface: UseScreenshotOptions ​
Hierarchy ​
Options
↳
UseScreenshotOptions
Table of contents ​
Properties ​
- backgroundColor
- cacheBust
- canvasHeight
- canvasWidth
- fetchRequestInit
- fileName
- filter
- fontEmbedCSS
- height
- imagePlaceholder
- includeQueryParams
- pixelRatio
- preferredFontFormat
- quality
- shouldDownload
- skipAutoScale
- skipFonts
- style
- type
- width
Properties ​
backgroundColor ​
• Optional
backgroundColor: string
A string value for the background color, any valid CSS color value.
Inherited from ​
HTMLToImageOptions.backgroundColor
cacheBust ​
• Optional
cacheBust: boolean
Set to true
to append the current time as a query string to URL requests to enable cache busting.
Inherited from ​
HTMLToImageOptions.cacheBust
canvasHeight ​
• Optional
canvasHeight: number
Height in pixels to be applied to canvas on export.
Inherited from ​
HTMLToImageOptions.canvasHeight
canvasWidth ​
• Optional
canvasWidth: number
Width in pixels to be applied to canvas on export.
Inherited from ​
HTMLToImageOptions.canvasWidth
fetchRequestInit ​
• Optional
fetchRequestInit: RequestInit
Overrides ​
HTMLToImageOptions.fetchRequestInit
fileName ​
• Optional
fileName: string
filter ​
• Optional
filter: (domNode
: HTMLElement
) => boolean
Type declaration ​
â–¸ (domNode
): boolean
A function taking DOM node as argument. Should return true
if passed node should be included in the output. Excluding node means excluding it's children as well.
Parameters ​
Name | Type |
---|---|
domNode | HTMLElement |
Returns ​
boolean
Inherited from ​
HTMLToImageOptions.filter
fontEmbedCSS ​
• Optional
fontEmbedCSS: string
A CSS string to specify for font embeds. If specified only this CSS will be present in the resulting image. Use with getFontEmbedCSS()
to create embed CSS for use across multiple calls to library functions.
Inherited from ​
HTMLToImageOptions.fontEmbedCSS
height ​
• Optional
height: number
Height in pixels to be applied to node before rendering.
Inherited from ​
HTMLToImageOptions.height
imagePlaceholder ​
• Optional
imagePlaceholder: string
A data URL for a placeholder image that will be used when fetching an image fails. Defaults to an empty string and will render empty areas for failed images.
Inherited from ​
HTMLToImageOptions.imagePlaceholder
includeQueryParams ​
• Optional
includeQueryParams: boolean
Set false to use all URL as cache key. Default: false | undefined - which strips away the query parameters
Inherited from ​
HTMLToImageOptions.includeQueryParams
pixelRatio ​
• Optional
pixelRatio: number
The pixel ratio of captured image. Defalut is the actual pixel ratio of the device. Set 1 to use as initial-scale 1 for the image
Inherited from ​
HTMLToImageOptions.pixelRatio
preferredFontFormat ​
• Optional
preferredFontFormat: string
The preferred font format. If specified all other font formats are ignored.
Inherited from ​
HTMLToImageOptions.preferredFontFormat
quality ​
• Optional
quality: number
A number between 0
and 1
indicating image quality (e.g. 0.92 => 92%) of the JPEG image.
Inherited from ​
HTMLToImageOptions.quality
shouldDownload ​
• Optional
shouldDownload: boolean
skipAutoScale ​
• Optional
skipAutoScale: boolean
A boolean to turn off auto scaling for truly massive images..
Inherited from ​
HTMLToImageOptions.skipAutoScale
skipFonts ​
• Optional
skipFonts: boolean
Option to skip the fonts download and embed.
Inherited from ​
HTMLToImageOptions.skipFonts
style ​
• Optional
style: Partial
<CSSStyleDeclaration
>
An object whose properties to be copied to node's style before rendering.
Inherited from ​
HTMLToImageOptions.style
type ​
• Optional
type: ImageType
Overrides ​
HTMLToImageOptions.type
width ​
• Optional
width: number
Width in pixels to be applied to node before rendering.
Inherited from ​
HTMLToImageOptions.width