Monday, October 22, 2012

How to make a PDF for free with Ghoscript

I few weeks back I faced a problem with PDFs. I needed to combine several PDFs into a single PDF. The solution was to use Ghoscript. (I later found another tool that could do the same). This brought back fond memories of ghostscript and how it introduced me to the concept of "printing to a PDF".
At one time or another we've all been asked how do you make a PDF file. The natural reaction would be that it would require Adobe Acrobat and would cost money. A lot of money for something so trivial. This isn't a problem on Linux because the ability to print to a Postscript file has been around for a long time. Run the file through the ps2pdf program and your done. Nowadays, you don't even have to do that. You can print to PDF straight from CUPS and some programs like LibreOffice even offer the ability to export directly to PDF.
I'd like to share with you how to "print to a PDF" on WindowsXP or even Windows7. Basically, it's creating a PDF file by printing. Except that instead of printing to paper, it becomes a PDF file. This opens up tremendous opportunities. First, any program can create a PDF. So long as it prints on Windows, the program can be used to create a PDF, sort of.
The tool that makes this possible comes from the makers of Ghostscript. Its called RedMon. It redirects the output of a printer and feeds it into another program on Windows. Basically, it takes the output of printer, instead of printing it on paper, and gives it to another program for further processing. This has many uses, if you are creative enough. But it's most useful if you want to create PDFs with ghostscript.
There two ways to do this. The first way is to install Ghostscript and RedMon, create a few files and configure a new printer. It's not terribly technically complicated. The instructions to create a PDF printer using just Ghostcript and RedMon is very clear.
The second method is just as clear although a bit shorter and requires one more program called MakePDF.

The instructions are clear and also have extensive screenshots for you to compare and follow. They can be found here. This could be the preferred way if you are allergic to creating a text file or wish to know as little as possible about computers. Or if you have to install this on computers regularly (like after a Windows re-installation).
I'm sure there are other programs that do the same thing. I wouldn't be surprised if they just re-used Ghostscript's code and put a friendly Windows front-end on it. But the method linked above give the users better control over the many options PDFs have available.
You need a little elbow grease to make the best of things.

Enhanced by Zemanta

No comments:

Post a Comment

Recently Popular