An XPS file represents page layout files that are based on XML Paper Specifications created by Microsoft. It was developed as a replacement of EMF file format and is similar to PDF file format, but uses XML in layout, appearance, and printing information of a document. It is, in fact, more justified to say that XPS is an attempt on PDF, but couldn’t get enough popularity as owned by PDF for many reasons. Microsoft provides XPS Document Writer by default from Windows 7 onwards for the creation of XPS files. XPS files can be generated by selecting the “Microsoft XPS Document Writer” as printer while printing the document.
XPS viewers come integrated as part of Windows Vista, Windows 7, Windows 8, and Internet Explorer 6 or later. XPS files become read-only once they are generated. This adds to the user’s confidence in received documents sent as XPS for the authenticity of the document. An XPS document can contain one or more pages as converted from the original document.
Microsoft submitted the XPS specification to Ecma International. In June 2007, Ecma Technical Committee 46 (TC46) was set up to develop a standard based on the OpenXPS Paper Specifications. Ecma International approved the Ecma Standard (ECMA-388) XPS specifications in June 2009 at the 97th General Assembly.
XPS File Format
The XPS format consists of XML markup that defines the composition of a document and the visual appearance of each page along with rendering rules for displaying or printing the document. It retains all the information to re-create a document on any system which makes it independent of the resources available on that system. The format is essentially a ZIP archive and if you rename the file extension to ZIP, you will see the constituent files that contain the document data. These documents include:
document page files (.fpage) - Contains document content and document format settings. Every page in XPS document has one FPAGE file.
document settings file (.fdoc) - Stores settings included in XPS archive.
document fragment files (.frag) - Defines the settings for the actual XPS file and every page in the document has its own .frag file.
These files retain the document contents in such a way that if, for example, someone doesn’t have the same fonts installed on their machine, the XPS viewer will still render those original fonts. This implies the inclusion of XML markup file for each:
2D vector graphics
Digital rights management
The XPS Document format includes a well-defined set of parts and relationships, each fulfilling a particular purpose in the document. The format also extends the package features, including digital signatures, thumbnails, and interleaving.
A typical XPS document looks as follows and can be analyzed in light of XPS file format specifications.