raw_base64 or raw_uri; options such as paper and duplex do not apply.
raw_uri, content is a URL that serves the bytes. The same rules as pdf_uri apply: 25 MB at most, no redirects, no private addresses, ports 80 and 443 only, and optional authentication for Basic protected URLs. qty prints the raw job that many times.
raw_base64 content must be canonical base64 text. Unlike PDF jobs, PrintEasy does not inspect the bytes beyond their size, so a malformed label prints whatever the printer makes of it.
Choosing the right printer
The printer’s driver must accept raw data.- Windows: the agent writes your bytes with the
RAWdatatype, which bypasses the driver’s rendering. Use the printer’s own driver or the “Generic / Text Only” driver. If the printer is shared over the network, add it as a local TCP/IP printer first (see Install the agent). - macOS and Linux: the agent submits the job to CUPS with the
application/vnd.cups-rawformat. Create the queue with the raw driver (lpadmin -p NAME -E -v DEVICE_URI -m raw, or “Raw Queue” in older CUPS) so CUPS does not try to filter the data.
Test printers
Test mode includes two raw printers, so you can build and test without hardware:- Test Receipt 80mm accepts ESC/POS bytes.
- Test Label 4x6 accepts ZPL bytes.
Encoding pitfalls
- Send bytes, not text. Build the payload as bytes (
bytesin Python,Bufferin Node) and base64 encode that, so the characters your printer needs are not changed on the way. - Text inside a receipt uses the printer’s code page. If you need accents or non-Latin scripts, select the code page with the matching ESC/POS command (
ESC t n) and encode the text to that code page yourself, for example"é".encode("cp858"). Do not send UTF-8 unless the printer is configured for it. - Include the line feeds and the cut command your printer needs. Receipt printers print nothing until they receive a line feed, and they do not cut by themselves.
- ZPL commands end with
^XZ. A label that is missing it waits for more data.