Can you direct pdf print to a zebra printer

2020-06-16 06:21发布

问题:

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?

回答1:

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.



回答2:

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.



回答3:

You can print a PDF to a Zebra printer using the Mobi Print Utility for android and iOS. It can print bluetooth or wifi.



回答4:

If you have a printer with Link-OS you can purchase and install PDF Direct from Zebra on the printer firmware. You can then send a pdf directly to the printer. We do this by connecting to port 9100 and sending the PDF.

https://www.zebra.com/us/en/products/software/barcode-printers/link-os/pdf-virtual-device.html