> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/cli/pdf2xps/pdf2xps.md).

# Convert PDF to XPS via Command Line

Convert PDF to XPS efficiently with Apryse's PDF2XPS software. Maintain quality, hyperlinks, and fonts in the conversion process. Learn more about XPS and why PDF2XPS is essential for seamless documen

Apryse's **PDF2XPS** is an easy-to-use, multi-platform software that provides users with a high-quality and efficient way to batch convert PDF to XPS or OpenXPS documents.

PDF2XPS enables high-quality conversion from PDF to XPS that maintains the original document quality and preserves hyperlinks, colors and fonts. The resulting self-contained and compact XPS file can be distributed, viewed, edited, archived, printed, and published. The conversion also offers a wide range of options to control the output file size and image quality.

<a href="/cli/get-started/download.md" class="button primary">Download PDF2XPS</a>

**Like other Apryse products, PDF2XPS does not rely on any third party components. The technology is suitable for use in high-throughput server environments and is also available as a component for integration with third party applications.**

<a href="/core/conversion/conversion.md" class="button primary">SDK Guide</a><a href="/core/get-started/samples/converttest.md" class="button primary">SDK Sample</a>

## What is XPS?

"XPS" stands for "XML Paper Specification" and is a new document format as well as the native print spooler format in Microsoft Windows™. The XPS document format consists of XML markup that defines the layout of a document and the visual appearance of each page along with rendering rules for distributing, archiving, rendering, processing and printing the documents. Just like PDF, the XPS document format enables users to view, print, and archive any type of documents without the original program that created them and without loss of fidelity.

## Why PDF2XPS?

With the emergence of the new document format XPS, interoperability between XPS and other document formats, predominantly a document format as widely accepted as PDF, will be crucial to many business workflows and applications.

Apryse is leading the way in developing the **next generation** of our core technology that will enable users to take advantage of both PDF and XPS document formats in their solutions.

## **Key Functions**

* Fast, high-quality conversion from PDF (Portable Document Format) to XPS (XML Paper Specification) or OpenXPS that maintains the original document quality and layout and preserves hyperlinks, colors and fonts.
  * Font support: Type1, TrueType, Type3 and Type0/CID Fonts, font subsetting on all supported PDF font types.
  * Color: ICC, DeviceN, Separation, RGB, CMYK, Indexed, etc.
  * Support for encrypted PDF documents (40 and 128 bit RC4, 128 bit AES, Crypt filters).
  * Support for all kinds of patterns, functions, and compression schemes.
  * Support for all annotation types.
  * Support for soft, explicit, and color-key masks.
  * The conversion preserves image and data compression resulting in small and efficient XPS documents while fully maintaining the original image quality.
* The conversion process preserves the original document's meta-data as well as other non-graphical information such as bookmarks, logical structure, and articles to produce XPS documents that directly map to their PDF equivalents.
* Forms, annotations and other PDF structures without XPS equivalents can be optionally exported as private namespace XML elements for further manipulation and processing by XPS consumers.
* Thumbnail generation option for fast navigation through multi-page documents.
* Automatic repair of broken PDF documents.
* Support for all versions of the PDF Language Standard, including Acrobat 9 documents as well as ISO PDF (ISO 32000).
* Batch conversion.
* Wild card and subfolder processing.
* 100% conversion accuracy. Features in the PDF specification that don't have XPS equivalents (such as Coons and Tensor Product shadings) can be selectively rasterized to render the exact replica of the original document.
* Available as a command-line utility, as a .NET component, and as a C/C++/Java library on various platforms (including Windows, Mac OS X, and Linux)

## **Common Use Case Scenarios**

* Developers may want to use PDF2XPS to quickly add XPS support to any application or workflow that currently supports PDF.
* Server-based, on-demand conversion of PDF documents to XPS files.
* Batch processing of large PDF collections with the same conversion options.
* Extending existing applications to take advantage of the XPS Print API and XPS print path available in Windows.

## **Operating Systems Supported**

* Windows, Linux and Mac.

## **System Requirements**

* At least 10 MB of free disk space.
* Memory requirement is dependent on source document being converted.

## Example

{% tabs %}
{% tab title="Shell" %}
{% code lineNumbers="true" %}

```sh
#!/bin/sh
echo "Example 1) Convert all PDF documents in this folder to XPS using default options:"
./pdf2xps -o test_out *.pdf --lic_key "<PDFNET_LICENSE_KEY>"
```

{% endcode %}
{% endtab %}
{% endtabs %}

## [PDF SDK](https://apryse.com/products/core-sdk/pdf) (Software Development Kit)

For developers who are looking for a software development component to integrate into their applications, Apryse offers a PDF to XPS conversion API as part of PDF SDK.

[PDF SDK](https://apryse.com/products/core-sdk/pdf) is a comprehensive, high-quality PDF developer toolkit for working with PDF files at all levels. Using our PDF library, developers can flexibly implement and create powerful PDF solutions and applications that can generate, manipulate, view, render and print PDF documents without any third-party software dependencies.

[PDF SDK](https://apryse.com/products/core-sdk/pdf) is available as a .NET component and as a cross-platform Java and C/C++ PDF library available on a wide range of platforms (i.e. Windows, Linux, Mac OS X, Solaris, etc).

For more details, please vist ([https://apryse.com/products/core-sdk/pdf/](https://apryse.com/products/core-sdk/pdf)) or contact a [Apryse representative](https://apryse.com/contact-us) for more information


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/cli/pdf2xps/pdf2xps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
