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
The reference pages cover the package,
parts and relationships, the document
and page markup, geometry,
brushes and colour, and text,
fonts and images.
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
Not described
XPS is specified in full by ECMA-388, which the pages follow.
Known, not yet covered
- Reference: the markup for digital signature definitions, the print ticket schema, discard control and annotations.
- Reference: the rendering rules (opacity compositing, tiling
details) and the validity rules for
Glyphs, see text and fonts. - Viewer: the file is not recognised as XPS; the explorer shows it as unidentified bytes, and no page is drawn.
Links
Software
- XPS Viewer – Microsoft’s viewer, an optional feature in Windows 10 and 11 (Windows)
- SumatraPDF – small, fast free viewer that opens XPS (Windows)
- Okular – KDE’s document viewer, which opens XPS (Linux, Windows)
Developers
- MuPDF – library that renders XPS as well as PDF (C)
- Ghostscript – whose GhostXPS interpreter renders and converts XPS (C)
- libgxps – GNOME’s library for reading XPS and OpenXPS (C)
Reference
- ECMA-388 Open XML Paper Specification – the standardised form of XPS, which documents the same markup
- XML Paper Specification – the Library of Congress’s description of XPS 1.0