How to print PCL file output to PDF file instead of printer

cupspdf

Running UniVerse, we have files generated that are PCL and (after much tweaking of settings) can print them to physical printers, but we need to print to PDF files. Have installed Cups-PDF, which will print a web page or document nicely as a PDF… but sending the PCL file it prints the PCL commands as literal text. Have changed/forced queue to raw, and searched the entire internets to no avail, and still cannot get the PCL file to print to a PDF-format file. We have a vended solution on an older machine, but with Linux being open-sourced and fancy-new… how do you take a PCL file output from an application and send it straight as a PDF file??? Thanks for any help/guidance.

Best Answer

As also pointed out by @StephenKitt, there is GhostPCL/GhostPDL. It takes PCL5 and PCL-XL, and can produce the same output formats as Ghostscript, including PDF.

It wasn't in my Debian package sources, but there are statically linked 9.20 amd64 binaries (12/2016) on the download page, which I have just downloaded/tried, and successfully converted the sample owl.pcl to a PDF 1.5.

the command line was:

./gpcl6-920-linux_x86_64 -sDEVICE=pdfwrite -o owl.pdf owl.pcl

As a sidenote: As @derobert had hinted, PCL is an output format, and indirectly, that it is mostly generated from some other source. And that it may be easier to generate PS(→PDF) from that source directly, instead of first pushing everything through PCL format.

Passing "via" PCL may also net you a semantics loss, and will definitely burn more CPU.

@CityOfHighPoint: If the PCL-files you want to convert all arrive in a specific folder, you can rig up something with to "watch" that folder, and convert any files found to PDF format, and save them to some other folder.

Related Question