The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Ghostscript: Create PDF files

Contributed by: Watts Martin
This tip is valid for: Both BeOS and Haiku

If you have Jake Hamby’s port of Ghostscript and BeOS R4.5, you can create PDF files from any BeOS application.

In the Ghostscript directory, there is a bin subdirectory with several shell scripts. The script “ps2pdf” converts Postscript files to PDF files. Copy or move it up a level, to /boot/apps/Ghostscript. (This assumes you’ve installed Ghostscript according to the directions, and /boot/apps/Ghostscript is in your PATH environment variable. Alternatively, you could add /boot/apps/Ghostscript/bin to PATH.)

To create a PDF file, first you have to create a Postscript file. Doing this is simple under R4.5–set up a Postscript printer in the Printer Preferences panel to print to a file. Then when you print from any application you’ll be prompted for the filename to create.

Then, from a terminal prompt, type ps2pdf [filename] to create a PDF file (if you’d created a file called, you would type ps2pdf

If you have xicon, you can give the ps2pdf shell script drag-and-drop capability.

PDF files can be displayed under BeOS with BePDF and Ghostscript itself (just type gs filename.pdf at a shell prompt). Ghostscript also has the ability to print PDF files. (Read the documentation for more information on this ability. If you download the “pslpr” shell script from BeBits, it will let you print PDFs and Postscript files to any Ghostscript-compatible printer without having to know Ghostscript’s command line options.)

Posted in Applications

(comments are closed).