PostScript Resources
Printing
- Direct printing can be done from Windows using GhostView.
- Windows printing with other manipulation can use PrintFile. This is a useful utility which enables you to print PostScript files to a PostScript printer, as well as being able to add borders, enable "n-up" printing (several pages per sheet), and other features.
- The HP8000 PostScript Printer can print double-sided pages. To select one of these options, in the advanced/prologue selection in GhostView, use one of the following files:
| Normal A4 |
a4tray.ps |
| A4 duplex |
a4duplex.ps |
| A4 tumble |
a4tumble.ps |
| A3 tray |
a3tray.ps |
| A3 duplex |
a3duplex.ps |
PostScript Utilities
PSUtils (alternate site), is a useful collection of PostScript manipulation routines. Some examples of what you can do include:
- psselect allows you to select one or more pages from a PostScript file. For example,
psselect -p5 infile.ps outfile.ps
selects only page 5.
- psnup allows you to put multiple pages on the one physical page. For example,
psnup -d0 -r -m40 -2 infile.ps outfile.ps
will print two pages of the source document onto one page, with no border lines (-d0).
psnup -d0 -r -m40 -4 infile.ps outfile.ps
will print four pages of the source document onto one page.
- pstops can process a PostScript file in many different ways. A useful facility is to be able to resize a PostScript file:
pstops -d 1:0@0.8(2.8cm,2.8cm) infile.ps outfile.ps
resizes all pages to 80% of the original, moves the page to center it and adds a border (-d).
- psbook can be used for booklets where pages are folded. For an 8-page booklet:
pstops -pa4 -d2 1:-0 booklet.ps print1.ps reverse order
psbook -s8 print1.ps print2.ps pair off pages
pstops -pa4 -d2 2:1L@.7(21cm,0)+0L@.7(21cm,14.85cm) print2.ps print3.ps reduce 2:1
Merging PostScript Files
- Add the path to gswin32c. For Ghostscript version 5.50, type
path=%path%;c:\gstools\gs5.50.
- To merge input1.ps and input2.ps to output.ps, type
gswin32c -dNOPAUSE -sDEVICE=pswrite -dBATCH -sOutputFile=output.ps input1.ps input2.ps
PostScript to Acrobat PDF
- Full instructions are contained in the file ps2pdf.htm, included with GhostView/GhostScript. For Ghostscript version 5.50, the full path is C:\gstools\gs5.50\Ps2pdf.htm.
- Add the path to ps2pdf and gswin32c. For Ghostscript version 5.50, type
path=%path%;c:\gstools\gs5.50.
- To convert myfile.ps to myfile.pdf type
ps2pdf myfile.ps myfile.pdf
- Check that you can read myfile.pdf using Acrobat Reader.
JPEG to PostScript
- jpeg2ps is a command-line utility for converting JPEG (suffix .jpg or .jpeg) to PostScript. To convert a file called picture.jpg to encapsulated PostScript (.eps), run the jpeg file through this program as follows:
jpeg2ps picture.jpg > picture.eps
Other Resources