FAS Computer Services to Harvard University IT: (617) 495-7777.
Postscript (PS) is a programming language for printing graphics
and text. Encapsulated PostScript (EPS) allows to include images
into a postscript document. You can view a PS document with
gv filename.ps (or ghostview) and print it with
lpr filename.ps . Unlike PDF (also of Adobe)
a simple text editor or a little C program suffices to produce
professional graphics or text. PS can then be translated into PDF
(with the command ps2pdf in Unix, by Adobe Distiller on PC or Mac).
Much about this programming language PS can be learend from examples
like example.ps . An simple example to
draw a hexagon.ps . The file
erastotenes.ps shows the programming language feature.
It is simple to make bumper stickers like sticker.ps ,
to make score sheets for chess scoresheet.ps (by
N. Elkies ). Postscript
is a programming language able to do any computation. Here is an implemntation
Because PS files are ASCII text, they can easily be modified by programs.
The Perl script watermark.perl (used as
watermark.pl inputfile.ps>outputfile.ps) for example adds a watermark on
each page. The script twopage.perl puts two
pages on one. Examples, how C programs can write PS files can be found
Frequently asked questions
| Question || Answer |
| I have a PS file in.ps with 234 pages from which I want to
extract the pages 3,4,7,20 ?
pstops 1000:3,4,7,20 in.ps>out.ps
generates a file out.ps containing all pages which are 3,4,7,20 modulo 1000.
| I want to save paper and convert a PS file in.ps into a file
out.ps which contains 2 original pages on each new page.
pstops "2:0L@.7(21cm,0)+1L@.7(21cm,12.85cm)" in.ps > out.ps
does the job.
| How do I convert a PS file in.ps into a PDF file?
gives a PDF file in.pdf.
| How do I convert a PS file in.ps into an animated
GIF movie in.gif containing in
each frame a page of the PS file?
convert in.ps in.gif