Skip to main content

Function: htmlToPNG()

htmlToPNG(html, options?): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/sdvtables/src/export/index.ts:274

gt_save_crop for any HTML: rendered at deviceScaleFactor, trimmed to its content, whitespace image pixels of background put back around it, then scaled to width when given. An image past Chromium's canvas limit (65,535 px a side, 268,435,456 px in all; near 1,000 plain rows at zoom 2) throws SdvplotError naming its size, before anything is drawn or written.

Parameters​

html​

string

options?​

PNGOptions = {}

Returns​

Promise<Uint8Array<ArrayBufferLike>>