Open XPS and OXPS files without the XPS Viewer
Someone sent you an .xps or .oxps file, and nothing on your Mac, Chromebook or phone opens it; since the April 2018 update, even Windows 10 and 11 no longer install the XPS Viewer by default. Drop the file here: every page is drawn with the document's own fonts, its text can be searched and copied, and any page saves as a PNG.
The file is read on your device. It is not uploaded, and nothing in it is fetched or run.
What it shows
- Every page, drawn. Each page is rebuilt as sharp vector graphics from the file's own page markup: shapes, lines, colour gradients, pictures and text, in the positions the program that printed it chose. It stays sharp at any zoom, and the page size is given in inches and millimetres.
- The document's own fonts. An XPS file carries the fonts it uses, lightly scrambled (see below). They are unscrambled on your device and handed to the browser, so an invoice set in Calibri or a form in Arial looks as it did when it was printed, even on a phone that has neither font.
- Search across every page. Type a word or a number: every match is listed with its page and the text around it, and highlighted on the page itself. Tap a match to go there.
- Copy the text. Select text on the page like on any web page, copy one page's text, or copy or save the whole document's text as a .txt file.
- Save a page as PNG. Any page as a picture at 192 dots per inch (twice screen size), ready to paste into a message or an e-mail.
- Find your way. The page count, a row of page thumbnails, a page-number jump, and a width choice from fit-to-screen up to 200 %.
- Document properties. Title, author, subject, keywords and the created and modified dates from
docProps/core.xml, the XPS or OpenXPS version, and any digital signatures and print tickets, listed. - Links, shown not followed. A web address written into a page (XPS keeps hyperlinks from Word, for example) is listed under that page as text. Nothing is opened or fetched.
What is inside an .xps file
XPS is Microsoft's fixed-page format from 2006, its answer to PDF, and OpenXPS is the same design standardised as ECMA-388 in 2009. Both are ZIP archives, which is why the file starts with PK. Inside, FixedDocumentSequence.fdseq (or FixedDocSeq.fdseq) lists the documents, each .fdoc lists its pages, and each .fpage is one page written in XML: Canvas groups, Path shapes whose outlines are written in a short code (M 72,183.9 L 172.15,183.9 ... Z), and Glyphs elements holding the text and its exact glyph positions. Positions are in 1/96 of an inch, so a US Letter page is 816 × 1056 units and an A4 page 794 × 1123.
The fonts are stored as .odttf files named by a GUID, such as Resources/31B91C59-562F-22BA-4218-644B40479162.odttf. They are ordinary TrueType fonts whose first 32 bytes are XORed with the 16 bytes of that GUID, read in reverse order. It is a licence formality, not protection: this page reverses it with the file name alone, which is what every XPS reader does.
An .oxps file differs from an .xps mainly in its XML namespace (schemas.openxps.org rather than schemas.microsoft.com/xps/2005/06) and a few renamed relationships, which is why the old Windows 7 XPS Viewer refuses .oxps files. This page reads both. Windows 8 and later save .oxps from “Microsoft XPS Document Writer” unless a program asks for the old format.
Files it opens
- .xps: XPS 1.0
- Written by “Microsoft XPS Document Writer” on Windows Vista and 7 (and by some programs on later versions), by Word's “Save as XPS”, and by some scanners and document-management systems.
- .oxps: OpenXPS (ECMA-388)
- What “Microsoft XPS Document Writer” saves by default on Windows 8, 10 and 11.
- Pictures inside
- PNG, JPEG, GIF, BMP, and TIFF (decoded by the MIT-licensed UTIF library that the photo viewer also uses). JPEG XR is named and left as a grey box, see below.
- On Windows
- The XPS Viewer can still be added: Settings, Apps, Optional features, Add a feature, “XPS Viewer”. It needs an administrator account and a download from Microsoft; this page needs neither.
What this cannot do
- Draw JPEG XR pictures. XPS allows pictures in JPEG XR (HD Photo,
.wdp), which no current browser decodes. They are counted under the page and drawn as a grey box of the right size. Pages from scanners usually use JPEG or TIFF instead, which are drawn. - Fill a pattern within a pattern. A shape filled with a VisualBrush (a small drawing used as a fill) is drawn; a VisualBrush inside another VisualBrush is left empty, and the page says so. Opacity masks (fades and cut-outs) are not applied either.
- Validate digital signatures. A signed XPS file's signatures are listed with their signing time, but they are not checked: the page does not tell you whether the document was changed after signing.
- Follow print tickets. Printer settings stored in the file (paper tray, two-sided printing, copies) are counted and ignored; pages are shown at the size their markup gives.
- Shape joined scripts exactly. Arabic, Hebrew and other right-to-left text is drawn as one run with the embedded font, shaped by the browser and squeezed to the width the file gives when the browser's shaping comes out wider; glyph-by-glyph positions are used for left-to-right text only, so a right-to-left line can differ slightly from the original in letter spacing. Vertical Asian text is drawn upright.
- Read text that is only a picture. A scanned page is one picture, so it has no text to search or copy; there is no text recognition (OCR) here.
- Edit or convert to PDF. It only reads. Each page can be saved as PNG; for a PDF, the XPS Viewer on Windows can print the file to “Microsoft Print to PDF”.