What is the PS file format?
A .ps file is a PostScript page-description language document developed by Adobe Systems in 1984. It can contain vector graphics, raster images, and text - all expressed as a human-readable ASCII program rather than a fixed binary layout. Every .ps file begins with the magic sequence %!, typically appearing as the full header line %!PS-Adobe-3.0, which signals to a PostScript interpreter or printer that the file contains executable drawing instructions.
.ps files revolutionized printing because they let creators combine text and images on the same page, a capability once available only through advanced CAD printing devices. A .ps file resembles a programming language file more than a conventional image format because it stores a sequence of instructions that a PostScript-compatible printer or interpreter - such as Ghostscript - executes to produce the final page.
PostScript evolved through three major specification levels: Level 1 (1984), Level 2 (1991, adding color models and compression), and Level 3 (1997, adding smooth shading and improved font handling). A closely related format is .EPS (Encapsulated PostScript), a single-figure embeddable subset that includes a %%BoundingBox declaration.
One practical advantage of the .ps format is that files can be sent directly to any PostScript-compatible printer without being opened in a dedicated application first. A .ps file can therefore be shared among users who do not have access to the software used to create it.
Although still used in professional print workflows and prepress, .ps has lost much of its former popularity to its successor, the PDF format. Both share PostScript foundations, and converting a .ps file to PDF is straightforward using tools such as Ghostscript's ps2pdf command or Adobe Acrobat.
Security & safety
RISK: MEDIUMPostScript is a full programming language, so a .ps file can contain executable code - and the interpreter that renders it (especially Ghostscript) has had serious security bugs allowing sandbox escape and command execution from a crafted file. Practical rules: keep Ghostscript fully updated, be cautious opening .ps files from untrusted senders, and prefer converting to PDF (then reading the safer PDF). A plain .ps from a trusted source/printer pipeline is fine. As with EPS, the active- content nature is the real risk, not the visible page.
Format details
in a nutshellPrograms that open PS files
Technical details
deep spec| MIME type | application/postscript |
| Magic bytes | `%!` (hex `25 21`) at byte offset 0; typical full header line is `%!PS-Adobe-3.0` |
| Text encoding | Plain 7-bit ASCII; the entire file is human-readable text |
| Language paradigm | Stack-based, Turing-complete page-description programming language |
| Document structure | DSC (Document Structuring Conventions) comments - lines beginning with `%%` - define pages, resources, and bounding boxes |
| Rendering model | Interpreted at render or print time; output is device-independent, using points (1/72 inch) as the base unit |
| Multi-page support | A single `.ps` file can describe any number of pages; the `%%Page:` DSC comment marks each new page |
| Color spaces | Supports DeviceGray, DeviceRGB, DeviceCMYK, and CIEBased color spaces; spot colors supported from Level 2 |
| Font support | Type 1 (native), Type 3, TrueType (Level 2+), and CFF; fonts can be embedded or externally referenced |
| Image encoding | Raster image data embedded as ASCII85 or hex-encoded streams; LZW and JPEG (DCT) compression supported from Level 2 |
| Print-spool use | Native spooler format for PostScript printers; many applications export `.ps` via a print-to-file option |
| Conversion | Ghostscript `ps2pdf` converts `.ps` to PDF; Adobe Distiller was the original commercial conversion tool |
| Security model | No built-in encryption or access permissions; the interpreter executes arbitrary code, making untrusted files a potential risk |
| Released | 1984 (Adobe PostScript); PostScript Level 1 1984, Level 2 1991, Level 3 1997 |
| Open standard | Yes · royalty-free |
| Specification | www.adobe.com |
PS conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about PS files.