How to View, Merge, Extract and Convert PostScript Files
This is a resource directory on where to find information and tools to View, Merge, Extract and Convert PostScript files. The article is divided in the following chapters:
» Viewing PostScript files
» Merging PostScript files
» Extracting PostScript files
» Converting PostScript to Something or Something to PostScript
Information and tools on Viewing PostScript Files
There are several alternatives for you to choose between for viewing PostScript files.
- Adobe Illustrator (Windows, Mac)
- Adobe Acrobat (Windows, Mac)
- Adobe Photoshop (Windows, Mac)
- ACDSee Photo Manager (Windows)
- GhostScript, an interpreter for the PostScript page description language (Windows, Mac, Linux, OS/2)
- GhostView / MacGSView which is a graphical interface for GhostScript, requires that GhostScript is installed (Windows, Mac, Linux, OS/2)
- MacGhostView is a Postscript previewer for Macintosh
- Samuraj Data has a PostScript and PDF online viewer
Information and tools on Merging PostScript Files
If you need to merge two or more PS files into one big PS file, it’s really rather simple. Just copy them, one after the other, into the final file. If that works, you’re done.
If that doesn’t work, add the following line of text between each pair of PS files:
false 0 startjob pop
where “0” is the number zero. For further information, click here!
Thanks to John Deubert for this elegant solution!
Information and tools on Extracting PostScript Files
Extract text from a PS document
A frequently asked question is: “How can I extract the text from a PostScript document?” It’s actually quite difficult!
The best way is to go back to the program which produced the PostScript document, and ask it for the plain text. If you have no way to do that, you can try the following.
» PSToText extracts the ASCII text from a PostScript or PDF document. (Requires Ghostscript to run.)
- MSWin and OS/2: This program is included in GSView 2.0 and later.
- Several hardware architectures
- Documentation and Source Code in Ubuntu (you compile)
» PreScript is another ASCII extractor. The site contains links to similar programs. (Requires Ghostscript and the Python interpreter)
Another method for extracting text from a PostScript document is to convert it to a bitmap graphics file (at perhaps 300 bpi resolution). An OCR program can then process the graphics file and produce a text file. (The paper-intensive equivalent would be to print the PS file, scan each page with a document scanner, and use the OCR program from there.)
See also Visual Integrity and Convert PDF to Text.
Extract images from a PS document
» PSRIP extracts the images from PostScript documents. (Requires Perl to run.)
» Extract-EPS extracts the eps images from a PS document and adds their bounding-boxes. (Requires Perl to run.)
Information and tools on Converting To and From PostScript Files
Convert PS to Something Else
» PS2PDF convert a PostScript file to a PDF file. Online tool (no need to install GhostScript to run).
» Linux users can download Moonshiner and GhostScript to convert from PS to PDF.
» PStill can convert PostScript, EPS, TIFF and JPEG files to PDF. On Windows it can be used as direct To-PDF printer, producing PDF directly from any application. Supports MSWin, Mac and Unix/Linux.
» PSToEdit translates PostScript into Flattened PostScript, PDF, TGIF .obj format, (Frame)Maker Intermediate Format, XFIG .fig format, Idraw format, gnuplot, Gnu Metafile, CGM, DXF, LWO, RIB, RPL, Tcl/Tk, Java applet, HPGL, AI, WMF, EMF, RTF, PIC, SGV, MetaPost, LaTeX2e, Killustrator, and OS/2 meta files. Win95/98/NT (included with GSView); for Unix, source code, you compile (Requires Ghostscript to run)
» Image Magick displays, manipulates, and converts over 70 image formats, including PostScript, EPS, and PDF (which require Ghostscript to run). (X-Window System, requires X library to run. Source code and executables for many OS’s.)
» XnView can import about 400 different graphic file formats and export to about 50 different file formats. It requires Ghostscript to run and is provided as freeware for private non commercial use.
» NetPBM converts PS to/from over 80 graphics formats. (Linux)
» GhostScript converts PS to PNG, JPEG, PNM, TIFF, BMP, PCX, PSD, PDF, EPS, PCL-XL. If you have many files to convert, set up Ghostscript batch jobs with GoBatchGS.
» Image Alchemy will convert your PS/EPS/PDF file for free to demonstrate their versatile software. You FTP your file to them, you get the converted file back.
» See also: Acrobat, Mayura Draw, Gimp, PSAlter, Preview and ConvertPS.
Convert Something Else to PS
A simple conversion of any document to PostScript is easy if you have a Windows or MAC application which can print the document.
For example, MSWord will convert .doc to PS, Firefox, Netscape or Internet Explorer will convert HTML to PS, and so on. You’ll need to install a PostScript printer driver (see note below). Then you start the application, open the document and print it, selecting the PS printer driver you’ve installed, and the “print to file” option. The file produced is the PS version of your document. (Last step: Change the filename extension from .prn to .ps). An excellent guide on how to create PostScript Files on Windows can be found in this Adobe PDF Manual.
Note: To install a printer driver in Windows: Start, Settings, Control Panel, Printers, Add Printer, choose printer.
Which PS driver to install?
If the PS will be printed only on one particular printer, use the specific driver for that printer. Otherwise, try for a lowest-common-denominator driver. The Apple Laserwriter II NT driver is often recommended for this purpose, since it generates really elementary PS which most any PS printer can print. Or try one of the default drivers that come with the Adobe PS driver.
(Avoid HP drivers, they generate PCL along with the PS, making them useless for this purpose.)
» Format a text file (including n-up printing) and send it to a PS printer. Mpage (for Unix), Enscript (for Unix, Win, OS/2), Enscript for Windows convert text files to PS, HTML, RTF, ANSI, and overstrikes. (MSWin)
» A2PS converts an ASCII text file to PS. Includes n-up, borders, headers, fonts, colors, and pretty-printing of code. (Website also has links to a2print, nh20s, ga2ps, Ogonkify.) (Unix, Win95/NT)
» AUTOTRACE converts bitmap graphics (BMP, TGA, PNM, PPM, PGM, PBM) into PS and other vector formats. (MSWin or you compile.)
» HP2PS converts HPGL to PostScript. (Dos, Windows, Unix) Shareware: Free download (HP2PS was discontinued in 2008)
» HP2XX converts HPGL to several formats, including EPS. (Source code, you compile)
» HTMLDOC converts HTML to PS and PDF. (Unix, Win95/NT)
» HTML2PS converts HTML to PS. (Perl)
» IMG2PS converts PGM, PPM, GIF, or JPEG to EPS or standalone PS. It maintains JPEG files’s compression, and preserves color mapping in GIF files. (Linux)
» JPEG2PS translates JPEG into PS without uncompressing the image data. (DOS, Unix)
» JPEG2EPS translates JPEG into EPS without uncompressing the image data. (All OSs, requires Ghostscript and GhostView)
» KVEC converts bitmap graphics (BMP, GIF, TIFF, ART) into PostScript and other vector formats (WMF, DXF, HPGL, ART). (Win95/NT, OS/2, NEXT, Unix)
» PCLTOOLS converts PCL to PDF, views PCL, and prints PCL to non-PCL printers. (MSWin). PCL2PDF has similar features. (MSWin and other OSs). GhostPCL views and prints PCL and HPGL/2 and converts to PDF. (Unix)
» POTRACE converts bitmap graphics (BMP, PPM, PGM, PBM) into EPS, PDF, and other vector formats. (Linux, Mac, MSWin, or you compile.)auto
» TED converts RTF to PS and PDF, and is an RTF word processor as well. (Linux)
» WMF2EPS converts Windows Metafile (WMF, EMF) into EPS with proper bounding-box. (Win95/98/2000/ME/NT)
» ViewCompanion views and converts HPGL/2 to many formats, including PS and PDF. (MsWin)
To convert PS fonts, see the Fonts section.