Introduction
EPS is a PostScript program that draws a single picture and is written to be placed inside other documents. It was defined by Adobe, and version 3.0 of the specification dates from 1992. For decades it was the standard way to hand logos and illustrations to printers and page layout programs.
An EPS file must declare its bounding box, the area it draws in, and must not change the state of the page it is placed on. Because a layout program may not be able to run PostScript, an EPS can carry a small preview image to show on screen instead. PDF and SVG have largely taken its place, but EPS is still common in print and stock artwork.
Structure
A plain EPS file is text. Its first line is %!PS-Adobe-3.0 EPSF-3.0, and
comment lines that follow the Document Structuring Conventions describe it:
%%BoundingBox is required and gives the drawing area in points, and others
give the title, creator and fonts. The PostScript drawing code follows.
A file with a Windows or TIFF preview starts instead with a 30-byte binary header. Its
first 4 bytes are C5 D0 D3 C6, followed by the offset and length of the
PostScript section, of a Windows Metafile preview and of a TIFF preview, and a checksum.
On the Mac the preview was kept in the file’s resource fork. EPSI files carry a preview
as hexadecimal comment lines instead.
0Binary header magic, then offsets and lengths, only when a preview is present30 bytes…PostScript%!PS-Adobe-3.0 EPSF-3.0, structuring comments, drawing codevaries…WMF or TIFF preview, optionalvaries
The header line, the comments, the rules for the PostScript and the three kinds of preview are laid out on the header, comments and previews reference page, and every comment of the Document Structuring Conventions 3.0 on the structuring comments page.
Not described
The structure and DSC pages follow Adobe’s EPSF 3.0 (TN 5002) and DSC 3.0 (TN 5001) specifications.
Known, not yet covered
- Reference: the EPSF 1.2 and 2.0 specifications were not read.
- Reference: the bodies of the DSC query comments are only summarised (EPS files do not use them).
- Reference: Appendix I of the PostScript Language Reference Manual, the rules for restricted operators, was not read.
- Viewer: there is no EPS plugin yet. Drawing the PostScript program would need a PostScript interpreter.
Links
Software
- Adobe Illustrator – Adobe’s vector editor, which opens and saves EPS (Windows, macOS)
- Adobe Photoshop – Adobe’s image editor, which opens EPS as a raster image (Windows, macOS)
- CorelDRAW – Corel’s vector editor, which imports and exports EPS (Windows, macOS)
- Inkscape – free vector editor that imports EPS with Ghostscript installed (Windows, macOS, Linux)
- Scribus – free page layout program that places EPS files (Windows, macOS, Linux)
- Ghostscript – PostScript interpreter that renders and converts EPS (Windows, macOS, Linux)
- GIMP – free image editor that opens EPS with Ghostscript installed (Windows, macOS, Linux)
- ImageMagick – command-line tool that converts EPS with Ghostscript installed (Windows, macOS, Linux)
Reference
- Encapsulated PostScript File Format Specification 3.0 – Adobe Technical Note 5002, 1 May 1992 (archived copy of Adobe’s partners site)
- PostScript Language Document Structuring Conventions Specification 3.0 – Adobe Technical Note 5001, 25 September 1992 (archived copy of Adobe’s partners site)