Postscript is a page description language. Here is a simple example of a Postscript file:
%!PS-Adobe-3.0 %%Title: printtest.txt newpath 270 360 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto closepath 4 setlinewidth stroke showpageThis is a complete file; it draws a bold, black square.
True Postscript contains only ASCII text and is device-independent --- it makes no reference to printer-trays for example. Such Postscript is often denoted generic Postscript.
There are many dialects of Postscript, or perhaps more accurately, there are many things which are called Postscript which are not. These derivatives are often designed to allow an operating system to interface with a particular printer and are generated by printer-drivers.
For example, a printer-driver for a Hewlett-Packard printer called by an application might produce this variant of the above file:
%-12345X@PJL JOB NAME="Simonh's Stuff" @PJL SET DUPLEX=OFF @PJL SET PRINTONBACKSIDE=OFF @PJL SET OUTBIN=UPPER @PJL SET PAPER=A4 @PJL SET RESOLUTION=600 @PJL ENTER LANGUAGE=POSTSCRIPT M%!PS-Adobe-3.0 %%Title: printtest.txt newpath 270 360 moveto 0 72 rlineto 72 0 rlineto 0 -72 rlineto closepath 4 setlinewidth stroke showpage @PJL EOJNote the non-ASCII characters (which might be represented by some editors, notably Emacs, as ^[, ^A and ^D). Amongst other things, such additions tell the printer which tray to use and whether to print on one or both sides. We refer to such a file as "wrapped postsript".
...previous | up (conts) | next... |