Introduction
XPS is Microsoft’s fixed-page document format, introduced with Windows Vista in 2006 as an alternative to PDF. Windows could print any document to an XPS file through the Microsoft XPS Document Writer printer, and Vista’s printing system used XPS internally. It never became common for sharing documents.
A standardised version, OpenXPS, was
published by Ecma International in 2009 and became the default in Windows 8, under
the extension .oxps.
Structure
An XPS file is a ZIP package that follows the Open Packaging Conventions, the same
packaging used by DOCX. A fixed document
sequence (.fdseq) lists one or more fixed documents (.fdoc),
and each of those lists its pages (.fpage). A page is XML in a subset of
the WPF markup: Glyphs elements place text with a given font,
Path elements draw shapes, and images are painted through brushes. Fonts
and images are stored as separate parts, and embedded fonts are usually obfuscated
with a key taken from their part name.
zip[Content_Types].xml, _rels/.relsXMLzipFixedDocumentSequence.fdseq the list of documentsXMLzipDocuments/1/FixedDocument.fdoc the list of pagesXMLzipDocuments/1/Pages/1.fpage one part per pageXMLzipResources/ fonts and imagesvaries
Links
Software
- XPS Viewer (Windows, an optional feature in Windows 10 and 11)
- SumatraPDF (Windows)
- Okular (Linux, Windows)
Developers
- MuPDF, C library that renders XPS as well as PDF
- Ghostscript, whose GhostXPS interpreter renders and converts XPS