How to Open XPS Files on Linux
Linux has better XPS support than most people expect. The open-source libgxps library implements the XPS specification and is the engine behind Evince (the GNOME Document Viewer) and Okular (the KDE document reader). If either is installed, you can open an XPS file directly — no conversion needed.
For command-line use or bulk conversion, the libgxps-utils package provides xpstopdf and related tools. Non-technical users can skip all of that and convert in the browser instead.
Opening XPS in Evince (GNOME) or Okular (KDE)
Evince is the default document viewer on Ubuntu, Debian, Fedora (GNOME edition) and most GNOME-based distributions. It reads XPS natively — double-click the file in the Files (Nautilus) manager and it opens directly, no extra packages needed if Evince is already installed.
Okular is KDE's equivalent and similarly reads XPS out of the box on KDE Plasma desktops (Kubuntu, openSUSE KDE, etc.). Open it from Dolphin or from the command line with okular file.xps.
If you are on a minimal install or a distribution that does not ship either viewer, install one with your package manager:
- Debian/Ubuntu:
sudo apt install evince - Fedora:
sudo dnf install evince - Arch:
sudo pacman -S evince
Command-line conversion with xpstopdf
The libgxps-utils package gives you a set of standalone converters that do not require a graphical desktop. On Debian and Ubuntu:
sudo apt install libgxps-utils
This installs four tools:
xpstopdf in.xps out.pdf— converts to PDF, preserving text and layoutxpstojpeg in.xps— renders each page as a JPEG imagexpstopng in.xps— renders each page as a PNG imagexpstops in.xps out.ps— converts to PostScript
For Fedora and RHEL-based systems the package name may vary; search with dnf search libgxps to find the correct name for your distribution. On Arch Linux the package is libgxps in the extra repository.
Both .xps and .oxps (OpenXPS) files are accepted by all four tools.
Convert XPS to PDF Online
Up to 20 files at once · 25 MB per file · no watermark · files deleted within 60 minutes.
Batch-converting a folder of XPS files
Once libgxps-utils is installed, a shell loop handles bulk conversion:
for f in *.xps; do xpstopdf "$f" "${f%.xps}.pdf"; done
This converts every .xps file in the current directory to a same-named .pdf. Swap *.xps for *.oxps if you are working with OpenXPS files. The output PDFs contain selectable text (not a flat raster scan), which makes them searchable and usable with screen readers.
Browser conversion for non-technical users
If you are on an unfamiliar system, a locked-down machine, or a distribution where package installation is restricted, use the converter below. It runs server-side, so no local software changes are required. The PDF lands in your browser's downloads directory and opens in Evince, Okular or any PDF viewer.
This is also the right route if you need to share the resulting PDF with someone who is not on Linux — the output is a standard PDF with no platform-specific quirks.
Frequently asked questions
Can Evince open XPS files on Ubuntu?
Yes. Evince reads XPS natively via the libgxps library. On a standard Ubuntu GNOME installation, Evince is pre-installed and will open .xps files when you double-click them in the Files manager.
What is libgxps and do I need to install it separately?
libgxps is an open-source C library that implements the XPS specification. Evince and Okular link against it, so you have it already if either viewer is installed. The separate libgxps-utils package adds the command-line tools xpstopdf, xpstojpeg, xpstopng and xpstops.
Does xpstopdf work with OpenXPS (.oxps) files?
Yes. The libgxps tools handle both .xps (original Microsoft format) and .oxps (OpenXPS, ECMA-388) files.
Can I open XPS in LibreOffice on Linux?
LibreOffice 4.4 and later can open XPS files in read-only mode and export them to PDF via File > Export As PDF. This is an alternative to the libgxps route, useful if LibreOffice is already installed.
What if my Linux distribution does not have libgxps in its repository?
Use the browser converter above — it runs server-side and produces a standard PDF that any Linux PDF viewer can open. Alternatively, check your distribution's package search tool for an equivalent package name.
Does xpstopdf preserve searchable text or produce a scanned image?
It preserves searchable, selectable text. XPS stores text as Unicode strings with font data, and the libgxps converter carries that through to the PDF output.
Last updated: June 2026