PCL to PDF for Windows and macOS

Summary | How use it | Acknowledgments | Support


A utility that converts PCL print files to PDF format

This page offers two almost identical utilities that create PDF output from PCL "print files." Both use GhostPCL by Artifex (released under the GNU General Public License) as the engine that performs the conversion. 

You may download WinPCLtoPDF (for Windows 7 or later) from this link. Unzip the application after downloading. (Note: Some antivirus programs mistakenly report that this application is unsafe, because the AutoIt scripting language that I used when compiling it has also been used for malicious programs. If you don't trust my software, please do not send me an e-mail asking for advice. Use someone else's software instead!)

You may download MacPCLtoPDF (for macOS 10.13 Mojave or later) from this link. Move the application from your Downloads folder to another folder before running it.

WinPCLtoPDF was written in AutoIt and compiled as an application; it contains a copy of GhostPCL, which is copied to your temporary-files directory and performs the task of generating the PDF output file. MacPCLtoPDF was written as an AppleScript application bundle which contains a copy of GhostPCL that generates the PDF output file.

The application is updated occasionally to incorporate the most recent version of GhostPCL. In December 2020, the Windows version, having earlier been updated to use GhostPCL 9.53, was largely rewritten to improve reliability and add features. The macOS version was updated in December 2023 as a universal (Intel-ARM) application, using GhostPCL 10.02.1.

For information on the binary GhostPCL files used in these applications, see another page. Note that these versions include the support for Dark Courier described on the linked page.


How to use it

The Windows and OS X/macOS versions work in almost identical ways.

You may either drop a PCL, PXL, or PRN file on to the application icon, or launch the application and select a PCL, PXL, or PRN file from a standard file listing. Drop or select only one file at a time.

After a few seconds, the application will create a PDF file in the same directory with the original file, but with ".pdf" appended to the original filename. So, if you drop c:\temp\output.pcl on to the application, it will create c:\temp\output.pdf in the same directory. If the output PDF file already exists, you will be prompted to overwrite it; if you choose Cancel, the application will quit without creating a new output file.

If the PCL file contains page-size data, the application will create a PDF file with the appropriate page size. If it contains no data, it will create (by default) a PDF with a US-Letter-sized page. If you want to force it to create A4 pages instead, then change the name of the application so that it includes "A4", perhaps changing the name to PCLtoA4pagePDF or something similar. (Expert OS X/macOS users may edit the AppleScript application itself and change a setting near the the top of the AppleScript instead of changing the name of the application.)

If you want the newly-created PDF file to open in your default PDF viewer (typically Adobe Reader under Windows, or Preview under OS X/macOS), then change the name of the application so that it includes the letter "v", perhaps by adding the word "viewer" to the filename. For example, you might change the name to PCLtoPDFviewer or something similar, as long as it contains the letter "v". (Expert OS X/macOS users may edit the AppleScript application itself and change a setting near the top of the AppleScript instead of changing the name of the application.)

The application performs minimal error checking in order to determine whether the input file is in fact a PCL file. It may attempt to convert files that are not in fact PCL files; if so, simply delete the resulting PDF file if one is created. If you try to convert a file that does not conform closely to the PCL specification, the application will prompt you before continuing. Of course, if you try to convert a file that is not a PCL file, the resulting PDF will be useless.

Under Windows only, you may specify the name and location of the output PDF file by running WinPCLtoPDF from the Windows command line, as follows (if you omit the output filename, the program creates a PDF file with the same name as the input filename but with the extension .pdf):

WinPCLtoPDF c:\path\to\input.pcl c:\different\path\to\different\output.pdf

Also, under Windows only, you may add the command-line parameter  silent  at the end of this line to prevent the program from displaying a prompt when it encounters a non-standard PCL file. Alternatively, you may add the command-line parameter  batch  at the end of this line to prevent the program from prompting before it overwrites an existing PDF file or when it encounters a non-standard PCL file or when any other error occurs; use this parameter with caution because it overwrites an existing output file!

Under macOS only, when printing from PCL code that does not specify format (in the way that, for example, PCL created by word processors specifies format) you may customize the font size, number of lines per page, "pitch" (number of characters per inch). A4 or US Letter paper, and portrait or landscape printing. You can also disable the prompt that asks whether you want to create a PDF from a file that does not conform to PCL standards. You may change the AppleScript to accomplish this (as shown near the top of the file) or you may add strings to the filename of the application itself.

If you change the AppleScript itself, macOS will complain that the application is corrupt; if this happens, open a terminal, type the string xattr -rc followed by a space (the space is essential!), drag the application into the terminal, and press Return.

To change options by changing the name of the application, add one or more of the following strings; feel free to add additional letters, e.g. landscape or NoPrompt instead of land or NoPr.


Acknowledgments

I could not have written this Windows version of this application without the help of many experts at the AutoItScript forum, and I could not have written the macOS version without the help of many experts at Macscripter.net.


Support

I cannot help you with bugs or any other problems in GhostPCL. If you want to get in touch with me about anything else connected with these applications, please use the address below.


Edward Mendelson (edward [dot] mendelson [at] columbia [dot] edu)