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.
Where can I download XpsConverter? |
---|
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
Open a Visual Studio Command Prompt window.
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
When you install the WDK, the XpsConverter.exe file is placed in the %programfiles%\Windows Kits\8.1\bin\<arch> or %programfiles(86)%\Windows Kits\8.1\bin\<arch> directories.
XpsConverter Command Syntax
XpsConverter <format>
[/InputFile=<inputfile> /OutputFile=<outputfile> | /InputFolder=<inputfolder> /OutputFolder=<outputfolder>]
[-logger:<LoggerType>]
[-logfile:<LogFile> ]
[ -device:<DeviceString> ]
[ /? ]
Command parameters
Parameter | Description |
---|---|
<format> |
Specifies the format to convert the source file(s) to. The <format> is required. Specify /OpenXPS to convert the document(s) to OpenXPS or /XPS to convert the document(s) to Microsoft XPS (MSXPS). |
/InputFile=<inputfile> /OutputFile=<outputfile> |
Use this option to convert <inputfile> and save it to <outputfile>. The <inputfile> must have the .xps or .oxps file name extension. |
/InputFolder=<inputfolder> /OutputFolder=<outputfolder> |
Use this option to convert all the files in <inputfolder> and save them to the <outputfolder>. Files in <inputfolder> 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<inputfolder> and all subdirectories.
|
-logger:<LoggerType> |
Optional. <LoggerType> indicates the type of log to generate (File, Console or WTT) to use during the conversion. The default logger is Console |
-logfile:<LogFile> |
Optional. Specifies the <LogFile> to use when the -logger option is FILE. If you do not specify a <LogFile>, the default log file is XpsConverter.txt. |
-device:<DeviceString> |
Optional. Specifies the<DeviceString> 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)