Skip to content

@burnmark-io/designer-core


@burnmark-io/designer-core / exportPng

Function: exportPng()

exportPng(doc, options?): Promise<Blob>

Defined in: packages/core/src/export/png.ts:12

Export a full-colour PNG. Returns a Blob that can be saved to disk or served directly in a browser.

On Node.js this goes via @napi-rs/canvas's toBuffer('image/png'). In browsers, OffscreenCanvas.convertToBlob({ type: 'image/png' }).

Parameters

doc

LabelDocument

options?

RenderOptions & object = {}

Returns

Promise<Blob>

Not affiliated with Dymo, Brother, Avery, or any hardware vendor.