Guide · Shipping labels

How to convert EPL to PDF

Updated · Rotomal

To convert an EPL label to PDF you need a renderer that reads EPL2, because most ZPL viewers, including Labelary, accept only ZPL as input. First confirm the file is EPL: its lines start with short commands such as N (clear the image buffer) and end with P1 (print one label set), while ZPL starts with ^XA. Then either ask your system for PDF or image labels instead, run the open-source Labelize tool (labelize convert label.epl -t pdf), install a commercial renderer such as Neodynamic EPLServer, or use a hosted converter.

Step 1: check that the file really is EPL

What you see in the fileWhat it is
Lines starting with N, q, Q, A, B or GW, ending with a P line such as P1EPL2
Starts with ^XA and ends with ^XZZPL / ZPL II
Starts with %PDF, or binary dataAlready a PDF or image, not label code

A ZPL-only viewer such as Labelary does not read EPL, so sending it EPL will not give you the label. If your file is ZPL, use our ZPL guide instead: https://rotomal.com/zpl-to-pdf/how-to-convert-zpl-to-pdf/

Step 2: know the commands that set size and output

  • N clears the image buffer before a new label is built. Zebra's EPL guide says to send a line feed before it.
  • q sets the printable width of the label, measured in printer dots.
  • Q sets the label (form) length and the gap or black-line length, also in dots.
  • P prints the buffer: P1 prints one label set, P5,2 prints five sets of two copies. Each P is at least one page in your PDF.
  • Because q and Q are in dots, the same file is a different physical size at 203 dpi and at 300 dpi. Render at the resolution of the printer the label was written for.

Option 1: ask the source for PDF or image labels

If you control the integration, this is the cleanest fix. The UPS Shipping API accepts GIF as well as EPL, ZPL and SPL as label formats. EasyPost supports PNG, PDF, ZPL and EPL2, and notes that only PNG labels can be converted to other formats afterwards. Linnworks tells users who see ZPL/EPL label formats cannot be printed to PDF to switch the label format to PDF or RAW in its printer configuration.

Option 2: the open-source Labelize tool

Labelize is an MIT-licensed Rust engine that renders ZPL, EPL and other label languages to PNG or PDF. It runs offline as a command-line tool or a self-hosted HTTP service, so labels never leave your machine. Its documented EPL support covers text, 1D and 2D barcodes, lines, boxes, binary graphics (GW), reference point and print.

labelize convert label.epl -t pdf

Option 3: a commercial EPL renderer

Neodynamic's EPLServer runs as a local service on Windows, macOS or Linux and converts raw EPL to PNG, JPG, PDF and other formats over HTTP or a raw TCP port, which lets older software print to it as if it were a printer. Its order page lists a Device ID licence at $199.90, perpetual, with one year of updates and support, and a free evaluation download.

Common problems and fixes

  • Content runs off the label or sits in one corner: q and Q are in dots, so you rendered at the wrong resolution. Most EPL shipping labels were written for 203 dpi; try 300 dpi next.
  • Most of the label is missing: the file probably calls a stored form with FR, or a stored graphic, that lives in the original printer's memory. Render the file that stores it first, or have your system send the label without stored forms.
  • Only one label comes out of a file with many: each N … P block is a label set; check that your tool outputs every set, not just the first.
  • Scanner rejects the printed barcode: the print dialog shrank the page. Set the scale to 100% (Actual size) and switch off Fit to page.

If you want this done for you

EPL Render converts EPL2 batches to PDF by upload, email, watch folder or API, reports any command it could not draw, and deletes your files after conversion. Plans start at $5 a month.

Questions

Can Labelary convert EPL to PDF?

No. Labelary's API takes ZPL as input; it lists EPL only as an output format, for converting ZPL into EPL.

Is EPL still used?

Yes. The UPS Shipping API, EasyPost and NetSuite's UPS and USPS integrations still offer EPL or EPL2 labels, next to ZPL and image formats.

Is there a free way to convert EPL to PDF?

Yes. For a single label, free browser previewers such as the Labelize playground or LabelPane can export a PDF. For many files, the open-source Labelize tool converts EPL to PDF offline if you can run software yourself.

Sources

Guides and answers