%!PS-Adobe-1.0
%%Creator: Peter
%%Title: typesetter independent troff
%%Pages: 2
%%DocumentFonts: Helvetica Helvetica-Bold
%%BoundingBox: 0 0 612 792
%%EndComments
/#copies 1 def
... prologue ...
/m /moveto load def % defining a motion
/s /show load def % defining a string output
...
% defining ...
...
%%EndProlog
%%Page: 1 1
/saveobj save def
... page script ...
saveobj restore
showpage
%%Page: 2 2
/saveobj save def
... page script ...
saveobj restore
showpage
%%Trailer
The comment lines beginning with "%%" are discarded by the PostScript
interpreter, but give the so-called
"Document Structuring Conventions"
information.
Der Kommentar "%%EndProlog" markiert das Ende des Prologs mit den Definitionen und den Beginn der Seitenbeschreibungen. Der Kommentar "%%Page:", der eine einzelne Seitenbeschreibung angibt, zählt die entsprechende Seitennummer auf. Der Page-Kommentar kommt nur in (mehrseitigen) Druckfiles vor, nicht jedoch in einem EPS-File, welches eine einzelne Illustration beschreibt.
Die neue Version 3.0 der Document Structuring Conventions kennt das Konzept der Ressourcen (eigene Fonts, Prozeduren, usw.). Der Prolog besteht dabei aus verschiedenen Ressourcen, die jeweils von den DSC-Kommentaren "%%BeginResource:" und "%%EndResource" eingeklammert sind. Beispiel aus PostScript Level 2:
%%BeginResource: halftone NXLaserPrinter ... Halbton-Definition ... %%EndResource %%BeginResource: colorspace NXCalibratedRGB ... Farbraum ... %%EndResource %%BeginResource: procset EUROPATTERN 0 0 ... Fuellmuster ... %%EndResourceWenn eine Ressource nicht im Prolog enthalten ist, muss sie importiert werden. Beispiel:
%%IncludeResource: font Korinna-RegularDies ist Aufgabe des Druck-Managers. Leider halten sich noch lange nicht alle PostScript-Treiber an die neue DSC-Version 3.0.
Normally, you can import your ps-file as eps-file, provided that your PostScript file is describing one illustration only (must not be a multi-page file). AND provided that your file begins with the following two PostScript comments:
%!PS-Adobe-2.0 EPSF-2.0 %%BoundingBox: 0 0 600 300where BoundingBox gives the lower left and the upper right corner of your illustration (in points). This information enables an importing application to place and resize your illustration.
In addition, an eps file must not contain some "dangerous" PostScript operators. Some operators to avoid: initgraphics, erasepage, setpageparams, exitserver, etc. You may find the complete EPS specification in the PostScript Reference Language, by Adobe Systems.
Fundamentally, an Encapsulated PostScript File is merely a standard PostScript file with a bitmap screen dump OPTIONALLY included in the file.