I have a JAVA program that creates a PDF file. However I need to send this PDF file to a printer via SDK for this printer that would only accept PRN file type …
I understand that a the PRN file is built by using the specific driver for the specific printer, so the java program should be able to pick the driver for use in order to convert the PDF to a PRN file
As for the question, why wouldn’t I send the PDF file directly to print via the driver, well, this is a zebra printer that prints and encode smart cards, performing printing and encoding is only available if approaching it from the SDK, if I were to sent in directly to the driver , it would only print without encoding the cards
The PDF will need to be rendered and set into the format desired by the printer.
GhostScript is what you want for this, the command would be:
gswin32c -dNOPAUSE -sDEVICE=PrinterName -sOutputFile="c:/out.prn" "file.pdf"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With