Does CreateXpsDocumentWriter create an XPS or an OXPS document?

1.4k Views Asked by At

I read that the XPS printer in Windows 8 produces OpenXPS (.oxps) files whereas its counterpart in earlier Windows versions produce XPS (.xps) files. So printing XPS files under Windows 8 implies a compatibility issue. Fair enough. But, what type of file does the CreateXpsDocumentWriter method create?

Does it use the XPS printer? If yes, how can you detect which XPS/OXPS setting the printer has? Or is it possible to choose XPS/OXPS via an API?

1

There are 1 best solutions below

1
On

If the extension is oxps, chances are that you got an openxps. try renaming it to .zip. If it's openXPS, you will be able to view the contained parts.

According to the remarks in the XpsDocument class description, you will get XPS, not OpenXPS ("For more information about XPS see the XML Paper Specification (XPS) available for download at http://go.microsoft.com/fwlink/?LinkID=65761.")