Architecture of an XPS Document

By Michael Flanakin @ 12:54 PM :: 10905 Views :: .NET 3.0, Other :: Digg it!

Introduction

The XML Paper Specification (XPS) is a document format created by Microsoft. There's been some controversy around the XPS format because it's a direct competitor to Adobe's Portable Document Format (PDF). There are a number of key differences between the two; however, I won't discuss those here. Instead, I will discuss the architecture of a simple XPS document. Note that this is not an intense exploration into the vast depths of XPS -- I only reviewed a couple small documents. If you're interested in an in-depth analysis, I recommend reading the full spec.

Instead of reading the spec, as a "normal" person would, I decided I'd dig thru the document and disect it myself. The scope of this article is to document just that: the architecture of an XPS document as seen thru my eyes. The approach I took in writing this article was to basically repeat the motions I took in my initial research; so it should be relatively easy for others to consume it.

The only other thing I wanted to mention before I get into the meat of the article is that XPS is built into .NET 3.0. I didn't know that before and found it very interesting. My main impetus for doing this investigation was that I've wanted to be able to edit XPS documents several times, but there isn't a program to do so, yet. While I have absolutely no doubt one will come out in some form, I figured this could give me an idea of how hard something like that might be.