SysTutorials

Opening XPS Files on Linux

· updated April 13, 2026

The mupdf package is available in most major Linux distributions. On RHEL/CentOS/Fedora:

sudo dnf install mupdf mupdf-tools

On Debian/Ubuntu:

sudo apt install mupdf

On Arch:

sudo pacman -S mupdf

mupdf is a lightweight, fast PDF and XPS viewer written in C. It’s significantly faster than heavier alternatives like Evince or Okular, making it ideal for quick document inspection.

Viewing XPS files

Open an XPS file directly from the command line:

mupdf document.xps

mupdf will launch a GUI window. Navigation is straightforward:

Why mupdf over alternatives

Evince (the GNOME document viewer) has inconsistent XPS support. It frequently fails with:

mupdf handles these cases reliably because it includes native XPS parsing and rendering. It’s also more responsive with large documents and uses significantly less memory.

Batch converting XPS to PDF

If you need to convert XPS files to PDF for broader compatibility:

mupdf -o output.pdf input.xps

Or use mutool (included with mupdf) for more advanced conversions:

mutool convert -O pdf -o output.pdf input.xps

For bulk conversion of multiple files:

for file in *.xps; do
    mutool convert -O pdf -o "${file%.xps}.pdf" "$file"
done

Extracting content from XPS

To extract text from an XPS file:

mutool extract input.xps

This creates directories containing extracted images and other resources. For text extraction specifically:

mutool draw -F text input.xps > output.txt

Troubleshooting

mupdf won’t open the XPS file: Verify the file isn’t corrupted. Try converting it on Windows first, or check if it’s actually an XPS file:

file document.xps

XPS file displays incorrectly: Some XPS files created with Windows-specific tools may have rendering quirks. Converting to PDF through mupdf usually resolves display issues.

Performance issues with large files: mupdf is optimized for responsiveness over memory efficiency. For extremely large documents (over 1000 pages), consider splitting the file or converting to PDF first.

Alternative viewers

If mupdf doesn’t work for your use case:

mupdf remains the best choice for quick, reliable XPS viewing on Linux.

2026 Best Practices

This article extends “Opening XPS Files on Linux” with practical guidance. Modern development practices emphasize security, performance, and maintainability. Follow these guidelines to build robust, production-ready systems.

2026 Comprehensive Guide for Linux

This article extends “Opening XPS Files on Linux” with advanced techniques and best practices for 2026. Following modern guidelines ensures reliable, maintainable, and secure systems.

Advanced Implementation Strategies

For complex deployments involving linux, consider Infrastructure as Code for reproducible environments, container-based isolation for dependency management, and CI/CD pipelines for automated testing and deployment.

Security and Hardening

Security should be built into workflows from the start. Use strong authentication methods, encrypt sensitive data, and follow the principle of least privilege for access controls.

Performance Optimization

Troubleshooting Methodology

Follow a systematic approach to debugging: reproduce issues, isolate variables, check logs, test fixes. Keep detailed logs and document solutions found.

Best Practices

Resources and Further Reading

For more information on linux, consult official documentation and community resources. Stay updated with the latest tools and frameworks.

← All posts