Showing posts with label XPS. Show all posts
Showing posts with label XPS. Show all posts

Tuesday, September 25, 2012

When is XPS not XPS? When it's OXPS. (Actually OXPS is a better XPS, but not if you're on Win7/Vista/XP)

Mitch Prince's Blog - XPS and OXPS file support in Windows 7 and Windows 8

"The XMLPaper Specification (XPS) was originally created by Microsoft and then adopted by ECMA TC46 as ECMA-388, the Open XML Paper Specification.  This is also referred to as OpenXPS.  XPS has the file extension of XPS and OpenXPS uses the OXPS file extension. These two file formats aren’t the same. Windows Vista and Windows 7 both contain support to view and create XPS files.  You can choose to print to the “Microsoft XPS Document Writer”  (MXDW) to create an XPS file and use the XPS Viewer to view them.

Windows 8 can view and create both XPS and OXPS files.   See OpenXPS Support in WindowsThe “Microsoft XPS Document Writer”  defaults to creating an OXPS file [GD:Emphasis added].  When creating a document, you can choose which file type to create when you are prompted for the filename.  You can change this default using the group policy editor or use PowerShell as described in Changing the Default Format for Microsoft XPS Document Writer.

You can’t view an OXPS file on earlier versions of Windows (i.e Windows 7, Vista, or WinXP) because, these operating systems only support XPS.


The Microsoft XML Paper Specification Essentials Pack (version 1.2) provides support for Vista and Windows XP to view and create XPS files but, not OXPS files.

However, you can use the XpsConverter utility to convert OXPS files to the XPS file format.  The Windows Driver Kit 8 (WDK) which used to be called the DDK, describes the XpsConverter tool.  This tool isn’t included in WDK 7.


I hadn't seen this and personally had thought XPS was pretty much dead. Interesting that not only is it not dead on Windows 8, but there's a new, better, and more open version.

The important point here is that if you're on Win8 and using XPS to share documents (say you're printing them to XPS to share them with someone else, or to archive a print out, etc) and they are on Win7, Vista, XP, you're going to want to either change your XPS Printer Driver settings or convert them.

Saturday, February 02, 2008

Custom XPS Printer Driver Magic

Adrian Ford - Generating XPS Automagically

"I got a mail overnight asking about ways to automatically generate XPS from applications, specifically asking for a way to enable existing applications that don't have knowledge of XPS to generate XPS content. The Microsoft XPS Document Writer (MXDW) allows you to do this, irrespective of whether you're using the .Net or Win32 platforms. There's two ways that applications can invoke MXDW. The first is via the normal action of a user printing, where MXDW is explicitly selected as the target printer. When using this route MXDW displays a 'Save As' dialog so the user can set the target XPS filename. The second route is where the application programmatically selects MXDW as the printer, in this case it can automatically set the output filename by setting lpszOutput in DOCINFO [1] [2]. ...


If you don't want users to select the filename (perhaps you want the file saved to some magic folder for further processing), and you're not in a position to modify the application to support setting the destination with DOCINFO, then there is another option [3]. Microsoft makes available the core components of MXDW as part of the Windows Driver Kit (available on Microsoft Connect and MSDN Subscriber Downloads). Using the WDK it is possible to build a custom XPS print driver (XPSDrv) that automates the output process, including doing much more than just setting a destination filename automatically.


XPS has not yet come up at work (where I do EDD, Electronic Data Discovery) as a possible output/delivery format, but I think it's only a matter of time.

There's a ton of goodness in XPS and I believe it will fit well in the Legal/Litigation Support/EDD world.

Why? Think redaction (where text is "blacked out", marked over, redacted because it's privileged, private, confidential information). With XPS you can REALLY redact a document, physically removing and replacing the redacted text. No cut-n-paste recovery, no hiding it or just covering it up, but text nuked, gone, removed, for now and forever. It's also a open format and easy to delve into (at it's heart, it's a zip with XML in it...).

So I'm keeping a minor watch on the XPS space and the above post is something I may be able to use on day...(i.e. Creating a special/specific implementation/instance of a XPS printer where I can control its output, file name, etc.)