PngExporter
Defined in: src/exporters/PngExporter.ts:36
PngExporter - Converts SVG to PNG.
Defaults to resvg, a native, browser-free rasterizer. Pass
engine: 'html-to-image' to opt into the Puppeteer-based fallback engine
instead.
Note: neither engine fetches external images (like AWS service icons from
a CDN) itself - exportPng (the sfn-diagram/png subpath) inlines them as
data URIs first via embedIcons when showIcons is set and the engine is
resvg. A caller using PngExporter directly must do the same.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PngExporter(options): PngExporter;Defined in: src/exporters/PngExporter.ts:39
Parameters
Section titled “Parameters”options
Section titled “options”PngExporterOptions
Returns
Section titled “Returns”PngExporter
Methods
Section titled “Methods”convert()
Section titled “convert()”convert(params): Promise<PngOutput>;Defined in: src/exporters/PngExporter.ts:46
Convert SVG string to PNG buffer
Parameters
Section titled “Parameters”params
Section titled “params”ConvertParams
Returns
Section titled “Returns”Promise<PngOutput>