Skip to main content

Introduction

info

The unit of all coordinates, lengths, and sizes are in millimeters.

A label is a JSON object with the following mandatory properties:

PropertyTypeDescription
formatnumberThe format of labels conforming the this specification must be 3.
widthnumberWidth of the label. A width of zero means that it will be automatically calculated.
heightnumberHeight of the label. A height of zero means that it will be automatically calculated.
objsarray of label objectsSee below for description.

The following optional properties are also available:

PropertyTypeDescription
bgColorstringLabel background color.
printDelaynumberPrint delay override in millimeters.
marginnumberDeprecated. Use printDelay instead.
hdpinumberHorizontal resolition setting override (in dots per inch).
vdpinumberVertical resolition setting override (in dots per inch).
vOffsetnumberVertical offset setting override. A positive value moves the label up.
rotationnumberRotation settings override. If set, must be one of NONE, CW90 for 90° clockwise rotation, CW180 for 180° rotation, or CCW90 for 90° counterclockwise rotation.
stretchnumberStretch setting override, where a value of 1 means no stretch.
Example
{
"format": 3,
"width": 50.0,
"height": 108.37,
"objs": [
{
"type": "Rect",
"x": 10.0,
"y": 10.0,
"height": 20.0,
"width": 20.0,
"fillColor": "black"
}
]
}