Encapsulated Postscript File Format Specification: Adobe Developer Support
Encapsulated Postscript File Format Specification: Adobe Developer Support
Encapsulated Postscript File Format Specification: Adobe Developer Support
Version 3.0
1 May 1992
PN LPS5002
Copyright 1985–1988, 1990, 1992 by Adobe Systems Incorporated. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form
or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written consent of the publisher. Any software referred to herein is furnished under license and may
only be used or copied in accordance with the terms of such license.
PostScript is a registered trademark of Adobe Systems Incorporated. All instances of the name
PostScript in the text are references to the PostScript language as defined by Adobe Systems Incorpo-
rated unless otherwise stated. The name PostScript also is used as a product trademark for Adobe Sys-
tems’ implementation of the PostScript language interpreter.
Any references to a “PostScript printer,” a “PostScript file,” or a “PostScript driver” refer to printers,
files, and driver programs (respectively) which are written in or support the PostScript language. The
sentences in this book that use “PostScript language” as an adjective phrase are so constructed to rein-
force that the name refers to the standard language definition as set forth by Adobe Systems Incorpo-
rated.
PostScript, the PostScript logo, Display PostScript, Adobe, the Adobe logo, Adobe Illustrator, Tran-
Script, Carta, and Sonata are trademarks of Adobe Systems Incorporated registered in the U.S.A. and
other countries. Adobe Garamond and Lithos are trademarks of Adobe Systems Incorporated. Quick-
Draw and LocalTalk are trademarks and Macintosh and LaserWriter are registered trademarks of
Apple Computer, Inc. FrameMaker is a registered trademark of Frame Technology Corporation. ITC
Stone is a registered trademark of International Typeface Corporation. IBM is a registered trademark
of International Business Machines Corporation. Helvetica, Times, and Palatino are trademarks of
Linotype AG and/or its subsidiaries. Microsoft and MS-DOS are registered trademarks and Windows
is a trademark of Microsoft Corporation. Times New Roman is a registered trademark of The Mono-
type Corporation plc. NeXT is a trademark of NeXT, Inc. Sun-3 is a trademark of Sun Microsystems,
Inc. UNIX is a registered trademark of AT&T Information Systems. X Window System is a trademark
of the Massachusetts Institute of Technology. Other brand or product names are the trademarks or reg-
istered trademarks of their respective holders.
This publication and the information herein is furnished AS IS, is subject to change without notice, and
should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorpo-
rated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any
kind (express, implied or statutory) with respect to this publication, and expressly disclaims any and
all warranties of merchantability, fitness for particular purposes and noninfringement of third party
rights.
Contents
1 Introduction 1
2 Guidelines for Creating EPS Files 3
Required DSC Header Comments 3
Conditionally Required Comments 5
Recommended Comments 6
Illegal and Restricted Operators 6
Stacks and Dictionaries 6
Graphics State 7
Initializing Variables 7
Ensuring Portability 8
Miscellaneous Constraints 9
3 Guidelines for Importing EPS Files 9
Displaying an EPS File 9
Producing a Composite PostScript Language Program 10
4 File Types and Naming 18
Apple Macintosh File System 18
MS-DOS and PC-DOS File System 18
Other File Systems 18
5 Device-Specific Screen Preview 18
Apple Macintosh PICT Resource 19
Windows Metafile or TIFF 19
6 Device-Independent Screen Preview 20
Guidelines for EPSI Files 21
7 EPS Example 23
Index 29
iii
iv Contents (14 Feb 92)
The encapsulated PostScript file (EPSF)
format is a standard format for importing and
1 Introduction
1
Figure 1 Document with an imported EPS file
OUTDOOR OUTDOOR
+ Sailboard Heaven
Is Lake Lopez
Transportation
of the Future
= Sailboard Heaven
Is Lake Lopez
Transportation
of the Future
50 Finest 50 Finest
Hiking Trails Hiking Trails
Applications that create conforming EPS files must follow the guidelines in
section section 2.” There are two required DSC comments, some condition-
ally required comments, and several programming guidelines to ensure that
the EPS file can be reliably imported into an arbitrary PostScript language
page description without causing any side effects. An example of a side effect
is erasing the page of the importing document or terminating the print job.
Applications that import EPS files must follow the guidelines in section sec-
tion 3.” An application importing an EPS file must parse the EPS file for DSC
comments and extract at least the bounding box and resource dependencies of
the EPS file. The application should also read and display the screen preview,
if present. If there is no screen preview provided in the EPS file, the applica-
tion must provide an alternate representation and allow the user to place and
transform the preview on the screen.
The application must then convert the user’s manipulations into the appropri-
ate transformation to the PostScript coordinate system before sending the
document to the printer. The application must also preserve its stacks, current
dictionary, and graphics state before the imported EPS file is executed.
Note that EPS files are a final-form representation. They cannot be edited
when imported into a document. However, the imported EPS file as a whole
may be manipulated to some extent, including transformations such as
translation, rotation, scaling, and clipping.
2 (1 May 92)
The format of this preview representation varies from system to system. It
is typically a Macintosh PICT resource, a TIFF file, or a device-independent
hex bitmap. If the EPS file does not provide a preview image, the application
that includes the EPS file must provide a representation of the preview, such
as a gray box that represents the extent of the EPS file. The end user can use
the screen preview to position and size the EPS file in the document.
To be considered a conforming EPSF version 3.0 file, a file must follow the
rules set forth in this appendix, be a single page document that fully conforms
to the DSC version 3.0 or later (described in the PostScript Document
Structuring Conventions Specifications available from the Adobe Systems
Developers’ Association), and include two required DSC header comments.
The first required DSC header comment informs the including application
that the file conforms to version 3.0 of the EPSF format as described in this
appendix. This is the version comment.
The second required DSC header comment provides information about the
size of the EPS file and must be present so the including application can
transform and clip the EPS file properly. This is the bounding box comment.
The four arguments of the bounding box comment correspond to the lower-
left (llx, lly) and upper-right (urx, ury) corners of the bounding box. They are
expressed in the default PostScript coordinate system. For an EPS file, the
bounding box is the smallest rectangle that encloses all the marks painted
on the single page of the EPS file. Graphics state information, such as the
current line width and line join parameters, must be considered when calcu-
lating the bounding box. Example 1: shows a minimally conforming EPS file
that draws a square with a line width of 10 units.
Example 1:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 5 5 105 105
10 setlinewidth
10 10 moveto
0 90 rlineto 90 0 rlineto 0 -90 rlineto closepath
stroke
The marks painted by Example 1:, and how they are positioned with respect
to the PostScript coordinate system, are illustrated in Figure 2. If the line
width were not considered when calculating the bounding box, the bounding
box would be incorrectly positioned by five units on each side of the square,
causing the application to incorrectly place and clip the imported EPS file.
The bounding box specified for this example is correct.
105
10
10 105
4 (1 May 92)
Regardless of the coordinate system in which an application operates, there
is a convenient way to estimate the bounding box: Print the page, then use a
point ruler to measure from the lower-left corner of the paper to the lower-left
corner of the image. Then measure to the upper-right corner, also using the
lower-left corner of the paper as the origin. These two measurements give the
bounding box and do not depend on any computation.
There are several optional DSC comments that may be conditionally required
for a conforming EPS file. These comments must appear in an EPS file if
certain features are present—for example, comments to bracket the preview
section or to state that a certain language version or language extensions
must be present in the interpreter.
The %%LanguageLevel: comment is required if the EPS file uses Level 2 fea-
tures without providing conditional emulation. With this information, the
including application can alert the user and avoid any errors that would be
generated if the file were sent to a Level 1 printer.
If the EPS file requires any fonts, files, forms, patterns, procsets (procedure
sets), or any other resources, the appropriate DSC comment must appear
in the header comments section of the file. See the PostScript Document
Structuring Conventions Specifications available from the Adobe Systems
Developers’ Association.
There are some PostScript language operators plus statusdict and userdict
operators that are intended for system-level jobs or page descriptions that are
not appropriate in an EPS file. In addition to all operators in statusdict and
the operators in userdict for establishing an imageable area, the following
operators must not be used in an EPS file:
6 (1 May 92)
Note Do not use the clear or cleardictstack operators to clear the stacks in an
EPS file. These wholesale cleanup operators not only clear the EPS file’s
operands and dictionaries from the stacks, they may clear other objects
as well.
In preparation for including an EPS file, the graphics state must be set by the
including application as follows: current color to black, line caps to square
butt end, line joins to mitered, line width to 1, dash pattern to solid, miter
limit to 10, and current path to an empty path. Also, if printing to a Level 2
interpreter, overprint and stroke adjust should be set to false. An EPS file can
assume that this is the default state. It is the responsibility of the application
importing the EPS file to make sure that the graphics state is correctly set.
%!PS-Adobe-3.0
...Document prolog of including application...
/x /lineto load def % Application defines x to be lineto
In the following example, the EPS file correctly initializes the variable x
before defining the procedure proc1:
%!PS-Adobe-3.0
...Document prolog of including application...
/x /lineto load def % Application defines x to be lineto
...More of document prolog and setup...
%%BeginDocument: GRAPHIC.EPS
...Document prolog and setup for EPS file...
/x 0 def % Initialize variables before defining procs
/proc1 {
/x exch def
x 4 moveto
} bind def
4 proc1 % Execute Proc1
...Rest of EPS file...
%%EndDocument
...Rest of including application document...
Although using outside resources, such as fonts, patterns, files, and procsets,
is allowed in an EPS file, the most portable files are those that are self-
contained and do not rely on outside resources. For example, if an EPS file
requires an encoding other than the default encoding for a font, then the EPS
file should perform the re-encoding.
EPS files must never rely on procedures that are defined in application- or
driver-provided prologs, such as procedures defined in the Apple LaserPrep
file. Such definitions might or might not be present, depending on the actions
of the enclosing program or previous jobs.
8 (1 May 92)
meaning, such as “flow control” or “marking the end of a file,” can cause file
transmission problems in certain communications environments. For exam-
ple, the control-D character is used as an end-of-file indicator in serial and
parallel communications channels. Because this character terminates the job
in serial and parallel environments, it is not prudent to produce an EPS file
with this character in it.
EPS files must not have lines of ASCII text that exceed 255 characters,
excluding line-termination characters.
CR is the carriage return character and LF is the line feed character (decimal
ASCII 13 and 10, respectively).
There are several techniques for including an EPS file in a document. The fol-
lowing scenario is typical:
1. When the user imports an EPS file, the application prompts the user to
select the EPS file to be imported.
2. The application opens the selected file and parses it for useful information.
If either of the two required header comments is missing, the application
should alert the user that the file is not a conforming EPS file and abort
the import.
3. If the version and bounding box comments are found, the application
should prompt the user to place the EPS file. It should then display the
screen preview. If no preview is provided with the EPS file, the application
must provide a representation of the EPS file.
If the application must create its own representation, a gray box matching
the extent of the bounding box with some information in it suffices. The
information should at least include the title of the EPS file. This can be
obtained from the DSC header comment: %%Title:. Other information,
such as %%Creator: and %%Creation-Date:, may also be displayed.
The bounding box comment can be used to help determine scaling factors
and the proportions of the illustration. The including application should
enable the user to specify a “placement box” to display the screen preview
or the application-supplied representation of the screen preview if there is
not a preview present in the EPS file.
The bounding box can be used to calculate a ratio that the application can
use if the user wants to maintain original proportions while specifying a
placement box. Alternately, the application may display the preview full size,
and then allow the user to size and place the graphic as desired. Regardless
of the method used to display the preview initially, the user should have the
option of maintaining the original proportions supplied by the bounding box
or distorting the proportions of the EPS graphic.
Redefine showpage
10 (1 May 92)
/showpage { } def
In preparation for including an EPS file, the including application must set
the graphics state as follows: current color to black, line caps to square
butt end, line joins to mitered, line width to 1, dash pattern to solid, miter
limit to 10, and the current path should be set to an empty path. This state
can be explicitly set using the following code segment:
Also, if printing directly to a Level 2 printer, the overprint and stroke adjust
graphics state parameters must be set to false. This can be done by condition-
ally using the following code segment:
Note If the application knows that any given parameter of the current graphics
state is already in its default state, there is no need to execute the related
PostScript language code to reset that parameter.
Push userdict
The application importing the EPS file must leave an empty operand stack for
the EPS file. It is reasonable for the EPS file to expect that the entire operand
stack be available for its own use. If the entire operand stack is needed and is
not available, a stackoverflow error may occur. Also, if the operand stack is
empty, an EPS file that inappropriately executes clear will not cause any
problems.
An EPS file should leave the operand and dictionary stacks as they were
before the EPS file was executed. However, this may not always be the
case. So before including the EPS file, the importing application should be
sure to count the number of objects on the dictionary and operand stacks.
Before including the EPS file in its page description, the importing applica-
tion must transform the PostScript coordinate system according to the final
user placement of the EPS file. The order of the transformation sequence
must be:
12 (1 May 92)
3. Scale, if the user has changed the size.
4. Translate the lower-left corner of the EPS file’s bounding box to the
user-chosen origin.
Details on transforming the PostScript coordinate system are below. The first
example is a simple case in which the user coordinate system matches the
default PostScript coordinate system. The second example is a general case
transformation from application space to the default PostScript coordinate
system.
Figure 3 shows an EPS file and its bounding box superimposed on a target
page. The EPS file is shown as it would be drawn if the EPS file were printed
without first transforming the PostScript coordinate system. The placement
box in the upper-right corner of the page shows where the user chose to place
the EPS file.
560,560
400,400
100,100
-100,-100
Figure 4 contains three diagrams that show the steps necessary to properly
translate and scale the PostScript coordinate system to achieve the user-
chosen placement on the page.
Translate to new origin Scale to fit placement box Translate to final position
Assuming that the bounding box found in the header of the EPS file is
%%BoundingBox: -100 -100 100 100, the following PostScript language code
fragment properly places the EPS file on the printed page:
This transformation code must be inserted into the PostScript stream ahead
of the EPS code being sent to the printer.
Figures H.3 and H.4 and the corresponding PostScript code fragment assume
that the application coordinate system matches the default PostScript coordi-
nate system. The following section discusses a more general coordinate
system transformation.
14 (1 May 92)
Figure 5 Application coordinate system plus placement box
0,0
20,20 right,top
left,bottom 60,60
0 792 translate
1 –1 scale
This assumes that each unit of application space is equal to one PostScript
unit. If one unit in application space were equal to five PostScript units, then
the transformation might look like this:
0 792 translate
5 –5 scale
Assuming that the coordinate system has already been properly translated
and scaled from the PostScript coordinate system to the application coordi-
nate system as above, then the following steps can be used to place the EPS
file in the user-chosen box:
where bottom, left, top, and right are coordinates of the placement box in
application space, and llx, lly, urx, and ury are bounding box parameters the
EPS file supplies.
As a final example, assume that the PostScript coordinate system has already
been transformed to match the application coordinate system, the EPS file
bounding box is %%BoundingBox: 20 20 100 100, and the user-chosen
20 60 translate
.5 –.5 scale
–20 –20 translate
The importing application should set up a clipping path around the imported
EPS file. This can be accomplished by setting a clipping path that corresponds
to the bounding box of the imported EPS file after making the PostScript
coordinate system transformations or by allowing the user to optionally
supply an arbitrary clipping path for special effects.
If an EPS file includes a screen preview in EPSI format, the importing appli-
cation should discard the preview before sending the document to a printer.
Although the EPSI preview is represented by PostScript comments and will
not pose a problem when included in the PostScript language file sent to the
printer, it takes extra time to transmit the preview.
If the preview in the EPS file is in Macintosh PICT format, do not include the
PICT resource in the PostScript language file sent to the printer.
If the EPS file does not include a screen preview, the entire EPS file can be
included in the PostScript language file sent to the printer.
The EPSF version 3.0 requires that an EPS file leave the operand and dictio-
nary stacks as they were before the EPSF was executed. However, this was
not explicitly stated in earlier versions of the EPSF format. Therefore, before
including the EPS file, be sure to count the number of objects on the dictionary
and operand stacks. After executing the EPS file, make sure the stacks con-
tain the same number of objects they did before the EPS file was executed.
16 (1 May 92)
Example 2:
/BeginEPSF { %def
/b4_Inc_state save def % Save state for cleanup
/dict_count countdictstack def % Count objects on dict stack
/op_count count 1 sub def % Count objects on operand stack
userdict begin % Push userdict on dict stack
/showpage { } def % Redefine showpage, { } = null proc
0 setgray 0 setlinecap % Prepare graphics state
1 setlinewidth 0 setlinejoin
10 setmiterlimit [ ] 0 setdash newpath
/languagelevel where % If level not equal to 1 then
{pop languagelevel % set strokeadjust and
1 ne % overprint to their defaults.
{false setstrokeadjust false setoverprint
} if
} if
} bind def
Example 3:
/EndEPSF { %def
count op_count sub {pop} repeat % Clean up stacks
countdictstack dict_count sub {end} repeat
b4_Inc_state restore
} bind def
Example 4:
BeginEPSF % Prepare for the included EPS file
left bottom translate % Place the EPS file
angle rotate
Xscale Yscale scale
-llx -lly translate
...Set up a clipping path...
%%BeginDocument: MyEPSFile
...Included EPS file here...
%%EndDocument
EndEPSF % Restore state, and cleanup stacks
EPS files have become a standard format for importing and exporting
PostScript language files among applications in a variety of heterogenous
environments. This section contains specific information about file types
and naming conventions in a variety of environments.
The recommended file extension is .EPS. For EPS files that provide an EPSI
preview, the recommended extension is .EPI. Because the name and exten-
sion may be user-supplied, it is recommended that the application provide a
default extension of .EPS or, if the file includes an EPSI preview, the applica-
tion can provide .EPI as the default extension.
The EPS file usually has a graphic screen preview so it can be transformed
and displayed on a computer screen to aid in page composition before print-
ing. Depending on the capabilities of the importing application, the user may
position, scale, clip, or rotate this screen representation of the EPS file. The
composing software should keep track of these transformations and reflect
them in the PostScript language code that is ultimately sent to the printer.
18 (1 May 92)
ronment. Also, a device-independent screen representation called EPSI is
specified in section section 6.” It is recommended that all applications sup-
port this format.
Given the size limitations on PICT images, the picframe and bounding box
may not always agree. If there is a discrepancy, the %%BoundingBox: must
always be taken as the “truth,” because it accurately describes the area the
EPS file will image.
The EPS file has a binary header added to the beginning that provides a sort
of table of contents to the file. This is necessary because there is not a second
“fork” in the file system as there is in the Macintosh file system.
The importing application must check the first 4 bytes of the EPS file. If they
match the header as shown in Table 1, the binary header should be expected.
If the first two match %!, it should be taken to be an ASCII PostScript
language file.
Bytes Description
It is assumed that either the Metafile or the TIFF position and length fields
are zero. That is, only one or the other of these two formats is included in the
EPS file.
The Metafile must follow the guidelines the Windows specification sets forth.
It should not set the viewport or mapping mode, and it should set the window
origin and extent. The application including the EPS file should scale the pic-
ture to fit within the %%BoundingBox: comment specified in the EPS file.
An EPSI file is truly portable and requires no special code for decompressing
or otherwise understanding the bitmap portion, other than the ability to
understand hexadecimal notation.
The bit order of the preview image data is the same as the bit order used by
the image operator. That is, the preview image is considered to exist in its
own coordinate system. The rectangular boundary of the preview image has
its lower-left corner at (0,0) and its upper-right corner at (width, height). The
byte order is fixed and should be (0,0) through (width – 1), then (0,1) through
(width – 1,1), etc.
20 (1 May 92)
6.1 Guidelines for EPSI Files
The following guidelines are to clarify a few basic assumptions about the
EPSI format, which is intended to be extremely simple because its purpose
is for interchange. No system should have to do much work to decipher EPSI
files. The format is accordingly kept simple and option free.
• The preview section must appear after the header comment section, but
before the document prologue definitions. That is, it should immediately
follow the %%EndComments: line in the EPS file.
• The preview image can be of any resolution. The size of the image is
determined solely by its bounding box, and the preview data should be
scaled to fit that rectangle. Thus, the width and height parameters from
the image are not its measured dimensions, but rather describe the amount
of data supplied for the preview. Only the bounding rectangle describes
the dimensions.
• The hexadecimal lines must never exceed 255 bytes in length. In cases
where the preview is very wide, the lines must be broken. The line breaks
can be made at any even number of hex digits, because the dimensions of
the finished preview are established by the width, height, and depth values.
• Each line of hexadecimal begins with a percent character (%). This makes
the entire preview section a PostScript language comment to be ignored by
the PostScript interpreter. The file can be printed without modification.
• Although the EPSI hex preview can be sent to the printer, to shorten trans-
mission time it is recommended that the preview image be stripped out of
the document before transmitting the file to the printer.
• The data for each scan line of the image must be a multiple of 8 bits long.
If necessary, pad the end of the scan line data with 0’s.
Example 5:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 80 24
%%Pages: 0
%%Creator: John Smith
%%CreationDate: November 9, 1990
%%EndComments
%%BeginPreview: 80 24 1 24
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FF0000000000000000FF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%FFFFFFFFFFFFFFFFFFFF
%%EndPreview
%%EndProlog
%%Page: "one" 1
4 4 moveto 72 0 rlineto 0 16 rlineto -72 0 rlineto
closepath
8 setlinewidth stroke
%%EOF
22 (1 May 92)
7 EPS Example
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 4 4 608 407
%%Title: (ARTWORK.EPS)
%%CreationDate: (10/17/89) (5:04 PM)
%%EndComments
...PostScript code for illustration..
showpage
%%EOF
the including document’s page description, including the imported EPS file,
would be represented as
%!PS-Adobe-3.0
%%BoundingBox: 0 0 612 792
%%Creator: SomeApplication
%%Title: (Smith.Text)
%%CreationDate: 11/9/89 (19:58)
%%Pages: 1
%%DocumentFonts: Times-Roman Times-Italic
%%DocumentNeededFonts: Times-Roman Times-Italic
%%EndComments
%%BeginProlog
/ms {moveto show} bind def
/s /show load def
/SF { %/FontIndex FontSize /FontName SF --
findfont exch scalefont dup setfont def
} bind def
/sf /setfont load def
/rect { % llx lly w h % Used to create a clipping path
4 2 roll moveto
1 index 0 rlineto
0 exch rlineto
neg 0 rlineto
closepath
} bind def
7 EPS Example 23
null
0 setgray 0 setlinecap
1 setlinewidth 0 setlinejoin
10 setmiterlimit [ ] 0 setdash newpath
/languagelevel where % If level not equal to 1 then
{pop languagelevel % set strokeadjust and
1 ne % overprint to their defaults
{false setstrokeadjust false setoverprint
} if
} if
}bind def
/EndEPSF { %def
count op_count sub {pop} repeat
% Clean up dict stack
countdictstack dict_count sub {end} repeat
b4_Inc_state restore
} bind def
%%EndProlog
%%BeginSetup
%%IncludeFont: Times-Roman
%%IncludeFont: Times-Italic
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
/pgsave save def
%%EndPageSetup
/F1 40 /Times-Roman SF
...Set some text with F1...
/F2 40 /Times-Italic SF
...Set some text with F2...
F1 sf
...Set some more text with F1...
F2 sf
...Set some more text with F2...
BeginEPSF
65.2 10 translate % Position the EPS file
.80 .80 scale % Scale to desired size
-4 -4 translate % Move to lower left of the
EPS
4 4 604 403 rect % Set up clipping path
clip newpath % Set the clipping path
%%BeginDocument: ARTWORK.EPS
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 4 4 608 407
%%Title: (ARTWORK.EPS)
%%CreationDate: (10/17/90) (5:04 PM)
%%EndComments
...PostScript code for illustration..
24 (1 May 92)
showpage
%%EOF
%%EndDocument
7 EPS Example 25
26 (1 May 92)
Appendix: Changes Since
Earlier Versions
Detailed DSC comment descriptions have been left out of this specification.
When developing an application that will support EPS files, the DSC version
3.0 (see the PostScript Document Structuring Conventions Specifications
available from the Adobe Systems Developers’ Association) should be used
with this specification.
%%Extensions:
%%LanguageLevel:
%%DocumentNeededResources:
%%IncludeResource:
%%Begin(End)Document:
• There is a list of illegal operators that must not be used in an EPS file.
27
• There is a list of restricted operators. If these operators are used in an EPS
file, they must be used in accordance with the guidelines presented in
Appendix I of the PostScript Language Reference Manual, Second Edi-
tion.
• The operand and dictionary stacks must be returned to the state that they
were in before the EPS file was executed.
• It is strongly recommended that an EPS file make its definitions in its own
dictionary or dictionaries.
• An EPS file must not rely on procedures defined outside of the server loop,
such as procedures defined in the LaserPrep file.
• The application must prepare the graphics state for the EPS file.
• The application must give the EPS file a clear operand stack.
A D
Apple Macintosh file system device-independent screen preview
EPS files and 18 EPS files and 20–22
Apple Macintosh PICT resource device-specific screen preview
EPS files and 19 EPS files and 18–20
applications dictionar(ies)
EPS files and 2–3, 27–28 EPS files and 6
displaying EPS files 9–10
B DOS file system
EPS files and 18, 19
%%BeginDocument:
EPS files and 12
E
%%BeginPreview:
EPS files and 20 %%EndDocument
%%BoundingBox: EPS files and 12
EPS files and 14 %%EndPreview
EPS files and 20
C .EPI file extension 18
.EPS file extension 18
changes .epsf file extension 18
EPSF format 27–28 .epsi file extension 18
clear EPS (encapsulated PostScript) files
EPS files and 7, 11 creating 3–9, 27–28
cleardictstack device-independent screen
EPS files and 7 preview and 20–22
clipping path device-specific screen preview and
EPS files and 16 18–20
comment(s) displaying 9–10
conditionally required for EPS example 23–25
files 5–?? file types and 18
recommended for EPS files 6 illegal operators 6
required for EPS files 3–5 importing 9–??, 28
compatibility naming 18
EPS files and 16 preparation for including 16
conditionally required comments restricted operators 6
EPS files and 5–?? EPSF (encapsulated PostScript file)
coordinate system transformation format 1–28
EPS files and 12–16 background 1–3
29
changes to 27–28 S
EPSI (encapsulated PostScript
interchange) files save
guidelines for 21–22 EPSF files and 10
screen preview(s)
device-independent 20–22
G
device-specific 18–20
graphics state EPS files and 16
EPS files and 7, 11 showpage
EPS files and 10, 28
I stack(s)
EPS files and 6, 11
image
EPSI files and 20
T
importing EPS files 9–??, 28
initializing variables tag image file format (TIFF)
EPS files and 7–8 EPS files and 19
transformation(s)
M coordinate system 12–16
N W
naming conventions Windows Metafile
EPS file 18 EPS files and 19
O
operand stack
EPS files and 11
P
PICT resource
EPS files and 19
portability of EPS files 8
preview
screen 18–22
R
recommended comments
EPS files and 6
required comments
EPS files and 3–5
restore
EPS files and 10