How to Convert XPS to PDF on Linux

Linux has better XPS support than macOS, iOS, or Android — the open-source libgxps library handles both .xps and .oxps documents and ships command-line tools for conversion. On Debian and Ubuntu, one apt command gives you xpstopdf. Evince and Okular can also open XPS files and export to PDF from the GUI. For non-technical users or one-off files, the online converter requires nothing installed.

Command-line conversion with xpstopdf (recommended)

On Debian, Ubuntu, and derivatives:

sudo apt install libgxps-utils
xpstopdf input.xps output.pdf

The libgxps-utils package also installs xpstojpeg, xpstopng, and xpstops for other output formats. xpstopdf accepts .oxps files as well as .xps.

For batch processing, a simple shell loop works:

for f in *.xps; do xpstopdf "$f" "${f%.xps}.pdf"; done

This converts every XPS in the current directory to a PDF with the same base name.

GUI export via Evince or Okular

Evince (GNOME Document Viewer) and Okular (KDE) both use libgxps internally and can open XPS files directly. From Evince, choose File → Print and select Print to File with PDF as the format. Okular has a File → Export As → PDF option. Both routes produce standard PDFs and work without touching the terminal.

Evince is typically pre-installed on Ubuntu GNOME and other GNOME-based desktops. Okular is the default document viewer on KDE Plasma.

Online conversion for non-technical users

If you prefer not to install packages, or if you are on a distribution where libgxps-utils is not straightforward to obtain, the online converter handles .xps and .oxps files up to 25 MB in any browser. Upload, choose PDF, and download the result.

This is also the faster option for a single one-off file when you do not already have libgxps installed.

Convert XPS to PDF Online

Up to 20 files at once · 25 MB per file · no watermark · files deleted within 60 minutes.

What xpstopdf does under the hood

The xpstopdf command is part of libgxps-utils, which in turn is built on the libgxps library. Libgxps parses the XPS ZIP container, reads the XAML content and embedded fonts, and renders each page to the target format. The library supports the original XPS spec and ECMA-388 OpenXPS. Output quality is generally high for text and vector content.

Frequently asked questions

What package provides xpstopdf on Linux?

The xpstopdf command is part of the libgxps-utils package. On Debian and Ubuntu: sudo apt install libgxps-utils

Can Evince open OXPS files on Linux?

Yes. Evince uses libgxps internally and supports both .xps and .oxps formats.

Is libgxps available on Fedora or Arch Linux?

Yes, libgxps is packaged for most major distributions. On Fedora it is in the standard repos; on Arch it is available in the official repositories as libgxps.

Does xpstopdf preserve selectable text in the PDF output?

Yes. libgxps renders the XPS content and embeds text in the PDF, so text remains selectable and searchable in the output.

How do I convert all XPS files in a folder at once on Linux?

Use a shell loop: for f in *.xps; do xpstopdf "$f" "${f%.xps}.pdf"; done — this converts every .xps file in the current directory.

Last updated: June 2026