Sample Label & Decoding
This page shows an example of a DashLink-generated shipping label and explains how to decode it. DashLink returns the label in base64-encoded form.
Example Label (PDF Base64)
"label_string": "JVBERi0xLjQKJfbk...."
This string represents an entire 4×6 PDF document.
How to decode base64 to PDF
Example (JavaScript/Node):
const fs = require('fs');
function decodeLabel(base64String, outputPath) {
const buffer = Buffer.from(base64String, 'base64');
fs.writeFileSync(outputPath, buffer);
}
decodeLabel(label_string, './label.pdf');
Similar in Python:
import base64
with open("label.pdf", "wb") as f:
f.write(base64.b64decode(label_string))
Example ZPL label
DashLink may also return ZPL strings (203 or 300 DPI). These strings can be sent directly to a Zebra printer.
Example pattern (shortened for illustration):
^XA
^CF0,60
^FO50,50^FDStoreName^FS
...
^XZ
Sample Label
Example label generated by DashLink, found in the shipping_label.label_string field.
