EPS (.eps, .epsf)

Background & Context

    • MIME types: application/postscript, application/eps, application/x-eps, image/eps, image/x-eps
    • EPS page description language and file format.
    • Commonly used in 2D vector graphics and page layout applications.
    • Self-contained PostScript fragment, suitable for inclusion in other documents.
    • EPS is an acronym derived from Encapsulated PostScript.
    • Plain text format.
    • Stores text and vector graphics using the PostScript language.
    • Can include fonts and embedded raster graphics.
    • Supports various color encodings, including monochrome, grayscale, RGB, and CMYK.
    • Precursor to PDF.
    • PostScript was introduced in 1984 by Adobe.

Import & Export

  • Import["file.eps"] imports an EPS file, returning its content as graphics.
  • Import["file.eps",elem] imports the specified element from an EPS file.
  • The import format can be specified with Import["file","EPS"] or Import["file",{"EPS",elem,}].
  • Export["file.eps",expr] exports an arbitrary text string, vector graphics, Notebook or Cell expression to EPS.
  • The export format can be explicitly specified with the command Export["file",expr,"EPS"].
  • Export["file.eps",{elem1->expr1,elem2->expr2,},"Rules"] uses rules to specify the elements to be exported.
  • Wolfram System fonts and other nonstandard fonts are by default embedded in the exported file if necessary.
  • Export["file.eps",expr] effectively renders expr as if it were being printed to the default printer. If expr is not a notebook, it will effectively create a notebook with the same properties as the notebook performing the evaluation, or a default notebook if the evaluation did not start in a notebook. The front end's PrintingStyleEnvironment option is used to pick the environment for printing.
  • The Wolfram Language attempts to preserve a vector description of the content where possible, but content requiring modern rendering methods not supported by EPS will be rasterized. This includes all 3D graphics and 2D content with transparency, color gradients, textures or shading.
  • See the following reference pages for full general information:
  • Import, Exportimport from or export to a file
    CloudImport, CloudExportimport from or export to a cloud object
    ImportString, ExportStringimport from or export to a string
    ImportByteArray, ExportByteArrayimport from or export to a byte array

Notebook Interface

  • In the notebook front end, Save As exports the active notebook as an EPS file.
  • Save Selection As exports the selected part of a notebook to EPS.

Import Elements

  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Summary"summary of the file
    "Rules"list of rules for all available elements
  • Data representation elements:
  • "Graphics"arbitrary 2D graphics
    "Plaintext"textual content given as a string
    "Image"raster image
    "Preview"embedded preview image
  • Import and Export use the "Graphics" element by default.

Options

  • General options:
  • BackgroundAutomaticbackground color shown in transparent image regions
    ImageSizeAutomaticoverall image size
    ImageResolution72image resolution for rasterization in dpi
  • Advanced Export options:
  • "AllowRasterization"Automaticwhether to rasterize 2D and 3D graphics
    "EmbeddedFonts"Truewhether to include nonstandard fonts
    "PreviewFormat"Noneformat of the image preview to be included
  • Possible settings for "PreviewFormat" are:
  • Noneno embedded preview
    "Interchange"device-independent preview (EPSI)
    "Metafile"Windows metafile preview (WMF)
    "TIFF"TIFF raster image
  • Possible settings for "AllowRasterization":
  • Automaticrasterize graphics with features such as transparency that cannot be reproduced faithfully in EPS
    Truealways rasterize graphics
    Falsealways use vector graphics

Examples

Basic Examples  (7)

Import an EPS file as vector graphics:

Export vector graphics to EPS:

Export a function plot to EPS:

When converting output containing characters to EPS, the Wolfram System by default includes all nonstandard fonts in the exported document:

This exports a Cell expression to EPS:

This converts a Notebook expression to EPS:

Create an EPSI file: