XPS libraries for C/C++
- libgxps is the GNOME XPS library used by Evince. It parses XPS and OpenXPS and renders pages onto any cairo surface (PNG, PDF, PostScript, SVG). LGPL-2.1, so it can be linked from closed-source programs.
- MuPDF opens XPS with the same API as PDF, EPUB and CBZ: render pages, extract text with positions, convert to PDF. Faster and more complete than libgxps, but AGPL-3.0 (or commercial).
Pick libgxps when the license matters or you already use cairo/GLib; MuPDF when you handle several document formats or need text extraction.
- libgxps libgxps is the GNOME C library for XPS and OpenXPS files. How to install it, open an .xps or .oxps file, render pages to PNG with cairo, convert XPS to PDF.
- MuPDF MuPDF is a C library that opens XPS and OpenXPS like PDF. How to render XPS pages to PNG, extract text and convert XPS to PDF in C, with licensing notes (AGPL).