Skip to content

PngExporter

Defined in: src/exporters/PngExporter.ts:25

PngExporter - Converts SVG to PNG with resvg, a native, browser-free rasterizer.

Note: resvg does not fetch external images (like AWS service icons from a CDN). exportPng (the sfn-diagram/png subpath) inlines them as data URIs first via embedIcons when showIcons is set; a caller using PngExporter directly must do the same.

new PngExporter(options): PngExporter;

Defined in: src/exporters/PngExporter.ts:32

PngExporterOptions

Background, font, scale and theme options for the PNG.

PngExporter

When engine is set to anything other than 'resvg'.

convert(params): Promise<PngOutput>;

Defined in: src/exporters/PngExporter.ts:46

Convert SVG string to PNG buffer

ConvertParams

Promise<PngOutput>