Introduction
info
The unit of all coordinates, lengths, and sizes are in millimeters.
A label is a JSON object with the following mandatory properties:
| Property | Type | Description |
|---|---|---|
| format | number | The format of labels conforming the this specification must be 3. |
| width | number | Width of the label. A width of zero means that it will be automatically calculated. |
| height | number | Height of the label. A height of zero means that it will be automatically calculated. |
| objs | array of label objects | See below for description. |
The following optional properties are also available:
| Property | Type | Description |
|---|---|---|
| bgColor | string | Label background color. |
| printDelay | number | Print delay override in millimeters. |
| margin | number | Deprecated. Use printDelay instead. |
| hdpi | number | Horizontal resolition setting override (in dots per inch). |
| vdpi | number | Vertical resolition setting override (in dots per inch). |
| vOffset | number | Vertical offset setting override. A positive value moves the label up. |
| rotation | number | Rotation settings override. If set, must be one of NONE, CW90 for 90° clockwise rotation, CW180 for 180° rotation, or CCW90 for 90° counterclockwise rotation. |
| stretch | number | Stretch 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"
}
]
}