Pcl to pdf linux

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

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.

./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 inotify to «watch» that folder, and convert any files found to PDF format, and save them to some other folder.

How to print file with the PCL escape sequences

To print a PCL code directly without filtering with cups these commands should be used and have to work:

lpr -l filename lp -o raw filename 

I prefer this method over converting it to PDF but a totally free script/technique would be interesting to know of. I didn’t found one myself. Comments referring to this are welcomed.

My story is somewhat ridiculous: I started with an old HP printer mentioned in my question (DeskJet 640C that is out of ink) then turned over to a newer one (D2460) assuming that it is HP, has to know PCL. This assumption of mine was wrong, the printer did not understood the PCL codes and returned a job completed right away. After reading a bunch of documentations I got the idea that the commands I try should work so went back to the old printer. There were small problems with the code that made it harder to recognize the problem (old printer started to move only for the second command), but it moved — Hurray! 🙂

Читайте также:  Nero burning rom linux

Источник

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

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.

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.

1 Answer 1

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.

./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 inotify to «watch» that folder, and convert any files found to PDF format, and save them to some other folder.

Источник

PCL to PDF Converter

Convert PCL to PDF online, from any device with a modern browser like Chrome and Firefox.

Convert your PCL files online. You can convert your PCL documents from any platform (Windows, Linux, macOS). No registration needed. Just drag and drop your PCL file on upload form, choose the desired output format and click convert button. Once conversion completed you can download your PDF file.

Читайте также:  Проброс токена через rdp linux

You even can perform more advanced conversions. For example you can convert password protected documents. Just expand LoadOptions and enter the password of your file. Or you can add a watermark to the converted PDF file. Expand the ConvertOptions and fill the fields for watermarking.

Converted PDF files are stored in the cloud. Privacy is 100% guaranteed. All documents are removed from the cloud after 24 hours.

You can convert your PCL documents from anywhere, from any machine or even from a mobile device. The PCL converter is always available online and is completely free.

  • Convert WORD to PDF, EXCEL to PDF, PDF to WORD, POWERPOINT to IMAGE, VSDX to PDF, HTML to DOCX, EPUB to PDF, RTF to DOCX, XPS to PDF, ODT to DOCX, ODP to PPTX and many more document formats
  • Simple way to instant convert PCL to PDF
  • Convert PCL from anywhere — it works on all platforms including Windows, MacOS, Android and iOS

Free Document

Free Document Conversion, Viewer, Merger app for Windows

  • Easily convert, view or merge unlimited files on your own Windows PC.
  • Process Word, Excel, PowerPoint, PDF and more than 100 file formats.
  • No limit of file size.
  • Batch conversion of multiple files.
  • One app with rich features like Conversion, Viewer, Merger, Parser, Comparison, Signature
  • Regular FREE updates with new features coming every month

PCL Printer Command Language Document

PCL stands for Printer Command Language which is a Page Description Language introduced by Hewlett Packard (HP). HP created PCL to provide an efficient way of controlling printer features across many different printing devices. The format was originally developed for HP’s dot-matrix and Inkjet printers but has been part of various thermal, matrix, and page printers with the passage of time. The format underwent several different revisions, resulting in different versions where each version was enhanced to meet the demands of time with respect to the printer control features

PDF Portable Document

Portable Document Format (PDF) is a type of document created by Adobe back in 1990s. The purpose of this file format was to introduce a standard for representation of documents and other reference material in a format that is independent of application software, hardware as well as Operating System. PDF files can be opened in Adobe Acrobat Reader/Writer as well in most modern browsers like Chrome, Safari, Firefox via extensions/plug-ins.

How to convert PCL to PDF

  • Open our free PCL to PDF converter website.
  • Click inside the file drop area to upload PCL file or drag & drop PCL file.
  • Click on Convert button. Your PCL files will be uploaded and converted to PDF result format.
  • Download link of result files will be available instantly after conversion.
  • You can also send a link to the PDF file to your email address.
  • Note that file will be deleted from our servers after 24 hours and download links will stop working after this time period.

FAQ

First, you need to add a file for conversion: drag & drop your PCL file or click inside the white area to choose a file. Then click the "Convert" button. When PCL to PDF conversion is completed, you can download your PDF file.

Читайте также:  Обновление ядра ubuntu linux

Of course! The download link of PDF files will be available instantly after conversion. We delete uploaded files after 24 hours and the download links will stop working after this time period. No one has access to your files. File conversion (including PCL is absolutely safe.

Yes, you can use our free PCL to PDF converter on any operating system that has a web browser. Our PCL to PDF converter works online and does not require any software installation.

Detailed examples are available at GitHub in the form of executable projects. If you are only interested in PCL to PDF conversion then check .NET & Java examples.

Other Supported Conversions

You can also convert PCL into many other file formats. Please see the complete list below.

Источник

Converting PCL to PDF

I am looking to create (as a proof-of-concept) an OCaml (preferably) program that converts PCL code to PDF format. I am not sure where to start. Is there a standardized algorithm for doing so? Is there any other advice available for accomplishing this task? Thanks!

nlucaroni, as I’m sure you know, I’ve been trying to get my hands dirty with OCaml and I have a problem that I would like to solve with my slowly accumulating OCaml knowledge. I am unfamiliar with the two you mention. Is there an approach you ca recommend?

yes I have noticed. ocamllex and ocamlyacc are lexer and parsers for a grammar. I know nothing of PCL and cannot recommend using them, but it seems like it could be a possibility.

3 Answers 3

Conversion of PCL to PDF can be incredibly complex (assuming you need it to be generic and not just for simple PCL). We’ve investaged this many times and in the end always revert to using other tools. We keep investigating as we are a development shop who uses and understands all elements of PCL to great detail. If you are not really familure with PCL it will be daunting task. One of the major issues is that overtime, printers have become, for the most part, tollerent of malformed PCL and as such, creating something that follows the rules to the letter of the law is not always sufficient. If; however, you have control over the PCL, you may be able to work it out with some amount of success.

I don’t mean to turn you off of this and I realize that you’ve come here looking for a programming answer but I have to say, this is a far from simple task and there are no ‘standarized algorithms’ for this (that I’m aware of).

If this is designed to be a tool to work alongside of somehting else you are building I’d highly recommend looking at these guys:

This is by far the most complete set of tools (Windows) for handling this. There are a few others but, based on our extensive use of PCL and conversion tools over the years, this is the only one that work all the time.

Источник

Оцените статью
Adblock
detector