Encapsulated PostScript
Encapsulated PostScript (EPS) is a Document Structuring Conventions–conforming (DSC) PostScript document format usable as a graphics file format. EPS files are more-or-less self-contained, reasonably predictable PostScript documents that describe an image or drawing and can be placed within another PostScript document. An EPS file is essentially a PostScript program, saved as a single file that includes a low-resolution preview "encapsulated" within it, allowing some programs to display a preview on the screen.
Filename extension |
.eps .epsf .epsi |
---|---|
Internet media type |
application/postscript, application/eps, application/x-eps, image/eps, image/x-eps |
Type code | EPSF TEXT |
Uniform Type Identifier (UTI) | com.adobe.encapsulated-postscript |
Type of format | Vector image format |
Extended from | PostScript |
An EPS file contains a BoundingBox DSC comment, describing the rectangle containing the image described by the EPS file. Applications can use this information to lay out the page, even if they are unable to directly render the PostScript inside.
EPS, together with DSC's Open Structuring Conventions, form the basis of early versions of the Adobe Illustrator Artwork file format.
Previews
EPS files frequently include a preview picture of the content for on-screen display. The idea is to allow a simple preview of the final output in any application that can draw a bitmap. Without this preview, the applications would have to directly render the PostScript (PS) data inside the EPS, which was beyond the capabilities of most machines until recently.
When EPS was first implemented, the only machines widely using PostScript were Apple Macintoshes. These machines could not directly render the PostScript, which presented Adobe with the dilemma of how to provide a preview image while also including the actual PS version for the printer. On the Mac this turned out to be easy to solve, as the Mac file system includes two parts (known as forks) that are logically referred to as one file. By placing the PostScript in the data fork and a standard Mac PICT resource in the resource fork, both images could be moved about together invisibly as if they were one file. While a PICT preview often contains a bitmap, it could also contain a vector representation of the whole image, providing very high quality previews.
Neither of these technologies is commonly used on any other operating system, however. When faced with the same problems on Microsoft Windows-based versions of their programs, Adobe chose to instead add a TIFF file encoded into the header section of the PostScript. Sometimes, though more rarely, they used the WMF (Windows Metafile) format instead. WMF has the potential to provide vector previews, similar to PICT on the Mac. Both of these PC format EPS files have a particular disadvantage: because the PostScript data, header and preview are all in the same file, they will cause printing errors if a program does not understand the format well enough to extract only the PostScript data.
A fourth format known as a EPSI includes an ASCII-encoded preview bitmap. This format allows for black-and-white previews only. It is mainly used on Unix-like systems. Unfortunately, with several different ways of representing the preview, they have limited portability. An application which is unable to interpret an EPS file's preview will typically show an empty box on screen, but it will be able to print the file correctly. The most widely supported kind of preview is a Windows format preview with a TIFF.
Vulnerability
Due to the ability to use embedded scripts, Microsoft removed support for EPS files in Microsoft Office programs in May 2018.[1][2][3]
Application support
A number of programs can save or convert text and vector art to EPS format, including:
- Adobe Acrobat
- Adobe Flash (in later versions, it is a hidden feature)
- Adobe Illustrator
- Adobe InDesign
- Adobe Photoshop (later versions)
- Affinity Designer
- Autodesk AutoCAD
- CorelDRAW
- Cytoscape
- DataGraph[4]
- FlexiSign
- FileStar
- Ghostscript
- GIMP
- GNU Octave
- GnuPlot
- IDL
- ImageMagick (requires Ghostscript)
- Inkscape
- InPage
- Ipe
- LaTeX
- LibreOffice Draw (requires Ghostscript)
- Macromedia Freehand
- Maple
- Mathematica
- MathType
- MATLAB
- OmniGraffle
- OpenOffice.org Draw (requires Ghostscript)
- PhotoImpact X3
- Python (programming language)
- QuarkXPress
- R (programming language)
- ROOT
- Scribus
- Sketch
- SketchUp
- Stata
- Xara
- Xfig
Many image converter programs can create EPS files containing the pixels of the image. An EPS file is a stream of generic PostScript printing commands. Thus many PostScript printer drivers have an option to save as EPS, or to add EPS DSC information to their output which you can "print to file". Saving as EPS was a feature of Microsoft's PSCRIPT.DRV Windows printer driver and Adobe's ADOBEPS.DRV Windows printer driver for Windows versions prior to Windows 2000.
See also
- Portable Document Format (PDF)
- Scalable Vector Graphics (SVG)
References
- "Support for EPS images has been turned off in Office". Retrieved 2018-02-23.
- "Description of the security update for Office 2016: April 11, 2017". support.microsoft.com. Retrieved 2018-02-23.
- "Coming together to address Encapsulated PostScript (EPS) attacks". Microsoft Security Response Center. Retrieved 2018-02-23.
- DataGraph
Further reading
- Adobe Systems Incorporated. Encapsulated PostScript: File Format Specification (PDF). Archived from the original (PDF) on 2017-08-18. Retrieved 2017-12-04.
- A First Guide to Encapsulated PostScript
- PostScript vs. PDF, Adobe, archived from the original on 2016-04-13CS1 maint: BOT: original-url status unknown (link): official introductory comparison of PS, EPS vs. PDF. [archived]
- EPS: a Programming Language
- All About of Encapsulated PostScript (EPS)