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.

  • I'm not sure there is an open source program to do that. Unix print systems normally expect PostScript input (nowadays switching to PDF). And they've mostly handled PCL (etc.) by just sending it to the printer, without understanding it. If you can get UniVerse to produce PostScript output, it'd be trivial... But maybe someone else knows of a solution. – derobert Dec 22 '16 at 17:41
  • 1
    This answer on SO could be what you're looking for. – Stephen Kitt Dec 22 '16 at 19:33
  • Thanks guys. Not able to change the output from PCL to GS easily, and there is a vended solution (expensive) out there so we are hoping an open-sourced alternative exists. Have found GhostPCL but can't figure out how to use it as a driver for a virtual printer. – City of High Point Jan 13 '17 at 16:07

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.

  • I had found GhostPCL and extracted the tarball, but couldn't figure out how to use it for the life of me :( Thanks for your command line example, I was able to make that owl.pdf file from the pcl in the unzipped folder... but I basically need this ghostpcl to be the driver for a virtual printer... so when I tell the app to print the report to the virtual printer, it generates a PDF report from the generated PCL output. (If I have the app print to a network printer, the PCL file prints fine so I want to send to PDF instead). There is vended software, but no open-source drivers apparently :( – City of High Point Jan 13 '17 at 16:01
  • Performance issues aren't a concern, I think our virtual server has dozens of cores and a massive amount of RAM ;) Bottom line is finding an open-sourced driver for sending PCL to a virtual printer, that will generate a PDF. Should be simple but proving to be very vexing :( – City of High Point Jan 13 '17 at 16:04
  • Holy Frijoles. using CUPS-PDF, created a virtual printer and assigned it as a cups-pdf printer, gave it a generic PCL driver, and it created these files without extensions in the application spooler. They were of course PCL files which the virtual printer had failed to convert to PDF. BUT... using your command line above I was able to convert the PCL to PDF for free. Now the rest is just configuring/scripting so the app can print to a virtual printer, which then pipes the output to ghostpcl and moves the file to the correct destination. Not neat, but free is good. – City of High Point Jan 13 '17 at 17:00

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.