Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting ZPL print stream into a PDF file

Tags:

pdf

zpl

Is it possible to convert a ZPL print stream into a PDF file? If so, how can this be done?

like image 885
user3087052 Avatar asked Dec 10 '13 13:12

user3087052


People also ask

Can you convert ZPL to PDF?

If your business operations include producing shipping labels (e.g., UPS, USPS, FedEx), industrial barcodes, packing slips, or QR-codes for produсt items, FolderMill can help you a lot. With it, you can easily automate printing of ZPL files or convert ZPL to PDF or image files: JPEG, PNG or TIFF.


2 Answers

You can use the Labelary web service. Normally it would give you a PNG image:

wget "http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/^xa^cfa,50^fo100,100^fdHello World^fs^xz" -O label.png

But it will give you a PDF file if you send the right Accept header:

wget "http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/^xa^cfa,50^fo100,100^fdHello World^fs^xz" --header="Accept: application/pdf" -O label.pdf
like image 150
Abel Avatar answered Sep 20 '22 15:09

Abel


The only way to do it is to save the ZPL preview as an image and then convert the image to a pdf.

See this answer for reference.

like image 44
Ovi Tisler Avatar answered Sep 21 '22 15:09

Ovi Tisler