Saturday, March 04, 2006

Command Line PDF Creation, for free.

If you want to make a pdf out of another file type, you have relatively few options, unless you want to buy expensive software. You could use OpenOffice (a recent version) and the pdf export function, which is nice, but If your original file was done in MS Word or something else that can't save in OpenDocument Format, the conversion might mess up some formatting. Scribus (a page layout/ graphics program) also has good pdf export features, but has even fewer import options. On a Unix like system, using the CUPS print system, you can use cups-pdf, which works very well, but produces very large files.

A convenient option I have found to work well is GNU Ghostscript, which can convert a postscript file to a pdf quite nicely. On a windows system at least, it is very easy to get a postscript file. All you have to do is create a new local printer that prints to the "File:" port and use a postscript printer driver. I have found that a Minolta color laser driver works very well, but just look for drivers with PS in the name. When you print to this printer you will be asked to save a .prn file, which is basically a postscript file, as long as you are using an appropriate printer driver. Then you can install and use ghostscript (you can find a windows binary on the net, search for ghostscript, there are a few different versions). Recent versions of ghostscript (just about every recent Unix machine will already have some form installed) have a script called ps2pdf, which does the conversion.

Anyway, the main point of this post, was to point you at this great article, on using ps2pdf to generate a PDF. You can also look at the main ps2pdf documentation.

This setup works well for me because, I am converting a huge and complex Word File (on a windows machine) to PDF on my Linux machine, although it may not work well for everyone. If this doesn't meet your needs, Adobe has trial versions of Acrobat and most of its other software available. I expect that is its easiest for most people to simply use OpenOffice though.

1 comment:

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!