PostScript and EPS: The Languages of Professional Print Production
PostScript and EPS (Encapsulated PostScript) are page description languages that defined professional printing for three decades. Before PDF became dominant, PostScript was the universal language of desktop publishing and laser printers. EPS remains relevant today as the vector format of choice for importing illustrations into print-production workflows, and PostScript fluency is essential for anyone troubleshooting print shop RIP (Raster Image Processor) problems.
What Is PostScript?
PostScript was developed by John Warnock and Chuck Geschke at Adobe Systems (1982–1984) as a device-independent page description language. Unlike bitmap formats that specify individual pixels, PostScript describes pages as programs in a stack-based interpreted language. A PostScript file is human-readable ASCII text containing instructions that tell a printer (or software RIP) how to construct the page.
PostScript's key innovations:
- Resolution independence: Curves, text, and fills are described mathematically; the printer renders them at its native resolution (300, 600, 1200, 2400 DPI)
- Bezier curves: Adobe's adoption of Bézier curves in PostScript defined the vector graphics model used in every design tool today
- Fonts as programs: PostScript Type 1 fonts are programs that describe letter shapes, enabling perfect rendering at any size
- Turing completeness: PostScript is a full programming language — it has loops, conditionals, procedures, and data structures
PostScript Levels
PostScript has evolved through three major versions:
| Version | Year | Key Features |
|---|---|---|
| Level 1 | 1984 | Core imaging model, Type 1 fonts |
| Level 2 | 1990 | Color management (CIE), CMYK, DSC comments, Forms |
| Level 3 | 1997 | Smooth shading, transparency operators, DeviceN colorspace, better PDF integration |
Most modern RIPs implement Level 3. Understanding which level a file targets matters when troubleshooting compatibility with older devices.
PostScript File Structure
%!PS-Adobe-3.0 ← PostScript version declaration
%%Title: My Document
%%Creator: Adobe Illustrator 28.0
%%BoundingBox: 0 0 612 792 ← Page dimensions in points (8.5×11 in at 72pt/in)
%%Pages: 1
%%DocumentData: Clean7Bit
%%EndComments
%%BeginSetup
% Resource definitions, font declarations
%%EndSetup
%%Page: 1 1
% Page content
%%EndPage
%%Trailer
%%EOF
The %% comments are DSC (Document Structuring Conventions) — a standard for organizing PostScript files so that tools can process them without fully interpreting the PostScript language.
PostScript Drawing Commands
PostScript uses a stack-based graphics model. Commands push operands and apply them:
%!PS-Adobe-3.0
%%BoundingBox: 0 0 400 400
% Set color (RGB)
1 0 0 setrgbcolor
% Draw a filled rectangle
50 50 300 200 rectfill
% Draw a path (Bézier curve)
0 0 1 setrgbcolor % Blue
2 setlinewidth
newpath
100 300 moveto
200 400 300 400 400 300 curveto % Bézier: (x1 y1 x2 y2 x y)
stroke
% Text
/Helvetica findfont 24 scalefont setfont
50 20 moveto
(Hello, PostScript!) show
showpage
%%EOF
Key PostScript operators:
moveto— Set current pointlineto,curveto,arc— Path constructionstroke— Draw path outlinefill— Fill path interiorclip— Set clipping regiongsave/grestore— Push/pop graphics statesetrgbcolor,setcmykcolor— Colorsetlinewidth,setlinecap,setlinejoin— Stroke attributestranslate,rotate,scale— Transform current matrixshowpage— Output page to printer
What Is EPS?
EPS (Encapsulated PostScript) is a restricted subset of PostScript designed for embedding graphics as objects within larger documents. An EPS file:
- Must contain exactly one page of content
- Must have a %%BoundingBox comment specifying the exact extent of the artwork
- Must not execute
showpage(or use%%EndPage/%%Traileroutside an EPS context) - Can be placed inside other PostScript documents or desktop publishing applications (InDesign, QuarkXPress)
%!PS-Adobe-3.0 EPSF-3.0 ← EPSF (EPS File) declaration
%%BoundingBox: 10 10 500 400 ← llx lly urx ury in points
%%EndComments
% Drawing commands here
% NO showpage — EPS must not trigger page output
The %%BoundingBox defines the clipping rectangle of the illustration. Applications use it to lay out the EPS without rendering it. The HiRes BoundingBox DSC comment provides sub-point precision when needed.
EPS Preview Images
EPS files can embed a low-resolution preview (bitmap thumbnail) for display in applications that cannot render PostScript:
- EPSI (Interchange): ASCII hexadecimal bitmap embedded in DSC comments — works on any platform
- EPSF + PICT (macOS Classic): PICT thumbnail in the resource fork — no longer relevant
- EPSF + TIFF (Windows): TIFF preview in file header (before the PostScript data) — the standard EPS+TIFF format expected by Windows applications
Modern applications (InDesign CC, Illustrator CC) render EPS directly without needing preview images.
Converting EPS and PostScript
# EPS/PS to PDF using Ghostscript
gs -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-sOutputFile=output.pdf \
input.eps
# EPS to high-resolution PNG (300 DPI)
gs -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pnggray \
-r300 \
-sOutputFile=output.png \
input.eps
# EPS to PNG with transparency (RGBA)
gs -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pngalpha \
-r300 \
-dGraphicsAlphaBits=4 \
-dTextAlphaBits=4 \
-sOutputFile=output.png \
input.eps
# PDF to EPS (distilled PDF → PostScript → EPS)
pdftops -eps input.pdf output.eps
# Convert PS to PDF keeping CMYK colors
gs -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dProcessColorModel=/DeviceCMYK \
-dColorConversionStrategy=/LeaveColorUnchanged \
-sOutputFile=output_cmyk.pdf \
input.ps
# Batch convert EPS folder to PDF
for f in *.eps; do
gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite \
-sOutputFile="${f%.eps}.pdf" "$f"
done
Python: Processing EPS with Pillow and Ghostscript
from PIL import Image
import subprocess
import os
def eps_to_png(eps_path, output_path, dpi=300, background='white'):
"""Convert EPS to PNG via Ghostscript."""
cmd = [
'gs',
'-dNOPAUSE', '-dBATCH', '-dSAFER',
'-sDEVICE=pngalpha',
f'-r{dpi}',
'-dGraphicsAlphaBits=4',
'-dTextAlphaBits=4',
f'-sOutputFile={output_path}',
eps_path
]
subprocess.run(cmd, check=True, capture_output=True)
# Flatten alpha onto background
with Image.open(output_path) as img:
if img.mode == 'RGBA' and background != 'transparent':
bg = Image.new('RGB', img.size, background)
bg.paste(img, mask=img.split()[3])
bg.save(output_path.replace('.png', '_flat.png'), 'PNG')
# Open EPS directly with Pillow (requires Ghostscript in PATH)
with Image.open('illustration.eps') as img:
# Pillow calls Ghostscript internally
img.load(scale=2) # 2× scale factor
img.convert('RGB').save('output.jpg', 'JPEG', quality=95)
def extract_eps_boundingbox(eps_path):
"""Read the %%BoundingBox from an EPS file."""
with open(eps_path, 'rb') as f:
for line in f:
line = line.decode('latin-1', errors='ignore').strip()
if line.startswith('%%BoundingBox:'):
parts = line.split(':')[1].split()
return tuple(float(p) for p in parts) # llx, lly, urx, ury
return None
bb = extract_eps_boundingbox('logo.eps')
if bb:
width_pt = bb[2] - bb[0]
height_pt = bb[3] - bb[1]
print(f"Size: {width_pt:.1f} × {height_pt:.1f} points")
print(f"Size: {width_pt/72:.2f} × {height_pt/72:.2f} inches at 72 pt/in")
EPS vs AI vs SVG vs PDF for Vector Artwork
| Feature | EPS | AI (Illustrator) | SVG | |
|---|---|---|---|---|
| Editability | Limited | Full (proprietary) | Full | Limited |
| Transparency | Level 3 only | Yes | Yes | Yes |
| Layers | No | Yes | CSS/groups | Yes |
| CMYK color | Yes | Yes | No (sRGB only) | Yes |
| Print production | Strong | Strong (via PDF) | Limited | Strong |
| Web use | No | No | Native | Via embed |
| Open format | Yes | No | Yes | Yes |
| Ghostscript support | Full | Partial | Via cairosvg | Full |
| Best for | Print legacy, logos | Editing master | Web icons | Universal delivery |
When EPS Is Still Relevant
Despite PDF's dominance, EPS remains required in specific contexts:
- Legacy print workflows: Older RIPs and prepress systems still expect EPS for spot-color logo placement
- Vinyl cutting / plotter workflows: Many sign-making and CNC plotter software accept EPS but not PDF
- Embroidery digitizing: EPS vector artwork as input to digitizing software
- Signage and large-format printing: Some RIP software for large-format printers still processes EPS natively
- Stock illustration sites: Many stock sites (Getty Images, Shutterstock) accept and distribute vector assets as EPS
Summary
PostScript defined the desktop publishing revolution, and EPS carried its vector graphics model into the age of digital print. While PDF has replaced PostScript as the primary delivery format, understanding PostScript operators, DSC structure, and the EPS BoundingBox mechanism remains essential for anyone working in print production, troubleshooting RIP issues, or processing legacy artwork files. Ghostscript remains the indispensable open-source tool for PostScript/EPS processing in any platform.
Related conversions
Frequent conversions across the catalogue: