Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you direct pdf print to a zebra printer

Is it possible to direct print a stored pdf via a zebra printer in Java? I can't find any mention of them being compatible with direct printing and I can't get it to print. Would I need to communicate directly via zpl?

The zebra printer works fine when printed through Acrobat Reader, does Adobe Reader translate the PDF into zpl?

like image 505
user2982867 Avatar asked Jul 22 '14 12:07

user2982867


2 Answers

The zebra printer works fine when printed through Acrobat Reader, does Adobe Reader translate the PDF into zpl?

No. Adobe Reader prepares a document that the system's print service can consume. The print service then invokes the Zebra drivers, and those are what convert the document into the printer's native language. This is how all print drivers work on all platforms, not just on Windows. CUPS does the same thing on Linux and MacOS.

Don't spend time building a PDF => image => ZPL translator. Your time will be better spent simply having your application speak to the OS native print service. I don't do Java, but a bit of time on my search engine of choice suggests that Java seems to support printing this way.

like image 104
Charles Avatar answered Sep 29 '22 22:09

Charles


A better but slightly not so reusable way is to use ZPL or EPL (whatever your particular zebra printer supports).

By the way ZPL is Zebra programming language which is proprietary to Zebra. You can directly write the ZPL String on to the serial or parallel port without installing any Zebra driver (rather using Windows Generic Text Printer driver). For example you can send following string directly to printer port (Serial, Parallel or Network)

^XA^FO40,40^AC2,20^FD^FS^FO40,60^BY2,2.8,10^BCN,100,Y,N,N^FD Barcode label ^FS^XZ

Hope it helps.

like image 38
user3054067 Avatar answered Sep 29 '22 20:09

user3054067