XpsConverter

XPS Converter (XpsConverter.exe) is a command-line tool for converting XML Paper Specification (XPS) documents from Microsoft XPS (MSXPS) to standardized OpenXPS, and from OpenXPS to Microsoft XPS (MSXPS). This tool is intended to aide in the conversion of XPS test collateral from one XPS format to the other.

XpsConverter.exe is included in the Microsoft Windows Driver Kit (WDK). For information about getting the WDK, see Windows Driver Kit Downloads.

The XpsConverter is not intended to be used in any other capacity than as a stand-alone tool. It is not supported for any other use. It may not be used in part or whole in any application or driver, and de-compiling or modifying the tool is strictly prohibited. Microsoft retains all rights and holds copyright on XpsConverter.exe and all its supporting documentation.

To convert XPS documents

  1. Open a Visual Studio Command Prompt window.
  2. Run the XpsConverter.exe tool and specify the names of the source and destination files or folders and specify the format to convert the file(s) to. For example, the following command converts the MSXPS file called text.xps to OpenXPS format.

XpsConverter /OpenXPS /InputFile=Text.xps /OutputFile=Test.oxps 

XpsConverter Command Syntax

 XpsConverter [/InputFile= /OutputFile= | /InputFolder= /OutputFolder=] [-logger:] [-logfile: ] [ -device: ] [ /? ] 

Command parameters

Specifies the format to convert the source file(s) to. The is required. Specify /OpenXPS to convert the document(s) to OpenXPS or /XPS to convert the document(s) to Microsoft XPS (MSXPS).

/InputFile= /OutputFile=

Use this option to convert and save it to . The must have the .xps or .oxps file name extension.

/InputFolder= /OutputFolder=

Use this option to convert all the files in and save them to the . Files in must have .xps or .oxps file name extensions.

Note Converting a folder is a recursive operation. The tool converts all files in the specified s and all subdirectories.

-logger:

Optional. indicates the type of log to generate (File, Console or WTT) to use during the conversion. The default logger is Console

-logfile:

Optional. Specifies the to use when the -logger option is FILE. If you do not specify a , the default log file is XpsConverter.txt.

-device:

Optional. Specifies the to use when the -logger option is WTT. The default device is $LogFile:file=XpsConverter.wtl,WriteMode=append.

Remarks

You can use the isXPS.exe (isXPS Conformance Tool) to tests a file's conformity to the XPS and the Open Packaging Conventions (OPC) specifications.

Examples

XpsConverter /OpenXPS /InputFile=Text.xps /OutputFile=Test.oxps XpsConverter /XPS /InputFolder=c:\OpenXPS /OutputFolder=c:\MSXPS XpsConverter /OpenXPS /InputFile=MyDoc.xps /OutputFile=ConvertedMyDoc.oxps logger:file logfile:MyLog.txt 

Related topics

isXPS.exe (isXPS Conformance Tool)