Skip to main content

getLabelSimulation

Render a label to an image.

Parameter

KeyTypeDescription
labelNamestringName of the label in the database. Mutually exclusive with labelData.
labelDataobjectA Label object. Mutually exclusive with labelName.
printerstringOptional printer ID. When specified, uses that printer's fonts and resolution for rendering.
envobjectOptional variable overrides applied before rendering.

Return value

KeyTypeDescription
datastringBase64-encoded PNG image data.
widthnumberImage width in pixels.
heightnumberImage height in pixels.
mimeTypestringAlways "image/png".

Example

getLabelSimulation {"labelName": "MyLabel"}