Convert image to ZPL
image_to_zplConvert an image (PNG, JPEG, BMP, GIF or SVG, max 200 KB) to a ZPL ^GF graphic command. SVG is rasterised at the chosen density from its declared size (mm/in honoured); SVGs with external references or a DTD are rejected. Returns the ZPL plus measured dimensions and the physical print size at the chosen density. PDF input is REST-only (/v1/graphics).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_base64": "<image_base64>"
},
"name": "image_to_zpl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpmm | No | Target printer density | |
| wrap | No | Wrap the ^GF in a printable ^XA...^XZ label with ^PW/^LL | |
| dither | No | Dither instead of hard threshold (photos) | |
| image_base64 | Yes | Base64-encoded image bytes. A data:image/...;base64, prefix and line breaks are accepted. |