Main Page Xps

From NDesk

Jump to: navigation, search

This is an implementation of XPS, the XML Paper Specification, a fixed-layout document format. It's not yet complete but manages to render many documents.

It works by targeting Cairo, a 2D graphics library with support for multiple output devices. The imaging models are fairly similar so lossless conversions to targets like PDF should be possible.

NDesk Xps is capable of taking an xps file and processing it entirely in memory, including support for loading and de-obfuscating embedded fonts and subsetting them (using Cairo) to the target surface. This means that text can maintain its typographic qualities throughout conversion without rasterisation.

The code is written in C# and has been tested on Mono. The only tool available is currently an XPS-to-PDF converter, however conversions to other file formats such as SVG and PostScript is trivially possible and will be supported soon. The code can also trivially and efficiently support graphical viewers, and the goal is to eventually provide Gtk# and Windows.Forms XPS viewer utilities.

XPS is an interesting format because, apart from its physical package layout, its format is a subset of Microsoft's WPF/E Windows Presentation Foundation. Thus the NDesk Xps project can act as a stepping stone towards a fuller implementation of the WPF specification.

Development ideas

In Cairo:


The renderer uses the NDesk Cairo library, an updated version of Mono.Cairo:

git-clone git://

To get the (experimental) Xps sources:

git-clone git://


mono loader.exe Document.xps

This produces Document.pdf.

Retrieved from ""