Interface: PNGOptions
Defined in: packages/sdvtables/src/export/index.ts:28
Options for htmlToPNG and tableToPNG; defaults are Python gt_save_crop's. Its expand (the page
captured before trimming) is fixed here, as it only has to leave background around the content. (The HTML itself
takes RenderOptions from @sportsdataverse/sdvtables/html.)
Extended by
Properties
background?
optionalbackground?:string
Defined in: packages/sdvtables/src/export/index.ts:34
the color around the content; default "white"
deviceScaleFactor?
optionaldeviceScaleFactor?:number
Defined in: packages/sdvtables/src/export/index.ts:32
the rendering zoom (Python zoom); default 2, a sharp (retina) image
file?
optionalfile?:string
Defined in: packages/sdvtables/src/export/index.ts:40
also write the PNG here (must end in .png)
fontLinks?
optionalfontLinks?: readonlystring[]
Defined in: packages/sdvtables/src/export/index.ts:38
stylesheet URLs (Google Fonts) awaited via document.fonts.ready
whitespace?
optionalwhitespace?:number
Defined in: packages/sdvtables/src/export/index.ts:36
image pixels of background left around the trimmed content (Python whitespace, truncated to an integer); default 50
width?
optionalwidth?:number
Defined in: packages/sdvtables/src/export/index.ts:30
the final image width in pixels, the height following (Python width); absent: the rendered width