Fixed-page documents on every platform
OfficeIMO.Xps handles Microsoft XPS and ECMA-388 OpenXPS packages with managed code. It reads multiple fixed documents, creates pages with paths, embedded fonts, text and images, edits page order and native page XML, and saves in the original dialect. OfficeIMO.Xps.Pdf converts the result to vector PDF; the example below needs both packages:
dotnet add package OfficeIMO.Xps.Pdf
using OfficeIMO;
using OfficeIMO.Xps;
XpsDocument document = XpsDocument.Load("invoice.xps");
foreach (XpsPage page in document.Pages)
Console.WriteLine(page.ExtractText());
OfficeConversionReport report = document.SaveAsPdf("invoice.pdf");
Useful for
- Converting printed XPS and OpenXPS output to searchable, tagged PDF.
- Rendering pages to SVG or PNG for previews.
- Extracting text and native logical structure for indexing.
- Assembling, splitting and reordering fixed documents while keeping links and outlines aligned.
- Producing fixed-layout pages with embedded fonts and images.
Strict by default
Conversion rejects features outside the documented rendering profile instead of silently dropping them; an explicit partial SVG mode returns diagnostics. Loading is bounded, external resources and DTDs are rejected, and nothing is fetched from the network.
Current limits
Signed packages can be read but not saved, and protected packages are not supported. Saves keep native page markup and opaque parts but rebuild ZIP packaging, so output is not byte-identical. PDF output does not claim PDF/UA or PDF/X conformance.
Start with the XPS guide or review the support matrix.