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.
tableNamestringOptional table to source variable values from when rendering.
keyColumnstring|numberOptional column in tableName to match against key. Requires tableName and key.
keystringOptional value to look up in keyColumn to select the table row. Requires tableName and keyColumn.

Return value

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

Example

getLabelSimulation {"labelName": "MyLabel"}