Encapsulated PostScript
EPS (Encapsulated PostScript) is a vector and raster graphics format based on Adobe's PostScript language, widely used in print production before PDF replaced it. EPS files contain executable PostScript code. Open or convert them with Ghostscript, Inkscape, or Adobe Illustrator.
Encapsulated PostScript requires a PostScript interpreter (Ghostscript) not available in browser WASM.
تبحث عن تحويل؟ جرّب صيغة ذات صلة:
أسئلة شائعة
How can I open and view an EPS file without Adobe software?
Use Ghostscript to render EPS to PNG or PDF: gs -sDEVICE=pngalpha -r150 -sOutputFile=out.png input.eps. Inkscape can also open EPS files for viewing and editing. On Linux, Evince and Okular display EPS directly using libspectre.
Why are EPS files considered a security risk?
PostScript is a Turing-complete programming language with file I/O operators. A malicious EPS file can read and write files on disk, execute system commands, and consume unlimited CPU time. Ghostscript has had multiple CVEs (CVE-2019-6116, CVE-2021-45949) related to unsafe PostScript execution.
Should I still use EPS for print production?
No. PDF replaced EPS as the print industry standard over 20 years ago. PDF supports transparency, multiple pages, and embedded fonts more reliably. Convert existing EPS files to PDF with Ghostscript for modern print workflows.
What is the difference between EPS and AI files?
EPS is an interchange format that flattens layers and live effects into static PostScript code. AI (Adobe Illustrator) is a proprietary format that preserves layers, artboards, symbols, and editable effects. AI files since Illustrator 9 are actually PDF-based internally.
ما يميز .EPS
What is an EPS file?
EPS (Encapsulated PostScript) is a graphics file format based on the PostScript language. It can contain both vector and raster graphics and was the standard exchange format for print production before PDF. EPS files include a low-resolution preview image and the full PostScript code for high-quality printing.
اكتشف التفاصيل التقنية
How to open EPS files
- Adobe Illustrator (Windows, macOS) — Full editing support
- Inkscape (Windows, macOS, Linux) — Free, converts via Ghostscript
- GIMP (Windows, macOS, Linux) — Rasterizes on import
- Ghostscript — Command-line rendering
Technical specifications
| Property | Value |
|---|---|
| Language | PostScript Level 1/2/3 |
| Graphics | Vector and raster |
| Color Modes | RGB, CMYK, Spot Colors |
| Preview | TIFF or WMF thumbnail |
| Standard | DSC (Document Structuring Conventions) |
Common use cases
- Print production: Legacy print workflow standard.
- Logo distribution: Universal format for brand assets.
- Stock graphics: Vector art distribution.
- Publishing: Book and magazine page elements.
المرجع التقني
- نوع MIME
application/postscript- Magic Bytes
25 21 50 53%!PS text signature. Binary EPS may start with C5 D0 D3 C6.- المطوّر
- Adobe Systems
- سنة التقديم
- 1987
- معيار مفتوح
- نعم
%!PS text signature. Binary EPS may start with C5 D0 D3 C6.
البنية الثنائية
EPS files exist in two physical formats: pure ASCII PostScript and binary (DOS EPS) with an embedded preview. Pure EPS files begin with the ASCII signature '%!PS-Adobe-' followed by the version and ' EPSF-' plus the EPSF version (e.g., '%!PS-Adobe-3.0 EPSF-3.0'). Binary DOS EPS files start with a 30-byte header: bytes 0-3 are C5 D0 D3 C6 (the DOS EPS magic), followed by a 4-byte offset to the PostScript code, 4-byte PostScript length, 4-byte offset to WMF preview, 4-byte WMF length, 4-byte offset to TIFF preview, 4-byte TIFF preview length, and a 2-byte checksum. The PostScript body follows DSC (Document Structuring Conventions): lines beginning with '%%' are structured comments. Key DSC comments include %%BoundingBox (integer coordinates in PostScript points, 1/72 inch), %%HiResBoundingBox (floating-point), %%Creator, %%CreationDate, %%Title, %%LanguageLevel (1, 2, or 3), %%DocumentFonts, and %%DocumentNeededResources. The %%BeginProlog section contains procedure definitions. %%BeginSetup contains page setup code. The main body between %%Page and %%Trailer contains the actual drawing operators: moveto, lineto, curveto, setrgbcolor, fill, stroke, image (for raster data), and show (for text). PostScript is a stack-based, Turing-complete programming language — EPS files can contain loops, conditionals, file I/O operators, and arbitrary computation.
| Offset | Length | Field | Example | Description |
|---|---|---|---|---|
0x00 | 4 bytes | DOS EPS magic (binary) or ASCII signature | C5 D0 D3 C6 or 25 21 50 53 | C5 D0 D3 C6 = binary DOS EPS with preview. %!PS = pure ASCII PostScript. The signature determines the parsing strategy. |
0x04 (binary) | 4 bytes | PostScript offset | 1E 00 00 00 | Byte offset to the start of the PostScript code section within the binary EPS file. |
0x08 (binary) | 4 bytes | PostScript length | varies | Length of the PostScript code in bytes. Used to extract the PS section from the binary wrapper. |
0x0C (binary) | 4 bytes | WMF preview offset | 00 00 00 00 | Offset to Windows Metafile preview image. Zero if no WMF preview is embedded. |
0x14 (binary) | 4 bytes | TIFF preview offset | varies | Offset to TIFF preview thumbnail. Most EPS files include a low-resolution TIFF or WMF preview for layout applications. |
Line 1 (ASCII) | variable | DSC version header | %!PS-Adobe-3.0 EPSF-3.0 | Identifies PostScript version and EPSF conformance level. Parsers use this to determine feature availability. |
نقاط الضعف
- PostScript code execution — EPS files contain a Turing-complete programming language that can execute loops, file I/O, and system commands when processed by an interpreter
- Ghostscript sandbox escapes — multiple CVEs (CVE-2019-6116, CVE-2021-45949, CVE-2023-36664) allow crafted EPS files to escape the -dSAFER sandbox and execute arbitrary commands
- ImageMagick delegation — ImageMagick processes EPS by delegating to Ghostscript, inheriting all Ghostscript vulnerabilities. The ImageTragick family of exploits (CVE-2016-3714) exploited this path
- Embedded malicious fonts — PostScript Type 1 font parsing bugs in Ghostscript and OS font renderers can trigger buffer overflows
الحماية: FileDex does not open, execute, or parse EPS files. Reference page only.