OfficeIMO.Xps.Pdf 3.5.1

Prefix Reserved
dotnet add package OfficeIMO.Xps.Pdf --version 3.5.1
                    
NuGet\Install-Package OfficeIMO.Xps.Pdf -Version 3.5.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Xps.Pdf" Version="3.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Xps.Pdf" Version="3.5.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Xps.Pdf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Xps.Pdf --version 3.5.1
                    
#r "nuget: OfficeIMO.Xps.Pdf, 3.5.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Xps.Pdf@3.5.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Xps.Pdf&version=3.5.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Xps.Pdf&version=3.5.1
                    
Install as a Cake Tool

OfficeIMO.Xps.Pdf

Convert XPS/OpenXPS pages to vector PDF through OfficeIMO.Xps, OfficeIMO.Core, and OfficeIMO.Pdf. No external renderer is used.

using OfficeIMO.Xps;

XpsDocument document = XpsDocument.Load("report.xps");
File.WriteAllBytes("report.pdf", document.ToPdf());

For a caller-owned output stream, use SavePdf. It returns the PDF engine's PdfSaveResult and accepts its existing output settings:

using OfficeIMO.Pdf;

using var output = File.Create("report.pdf");
PdfSaveResult saved = document.SavePdf(output, new XpsToPdfOptions {
    PdfOptions = new PdfOptions().SetEncryption("document-password")
}, cancellationToken);

The stream remains open. A successful save replaces and rewinds seekable output. Validation runs before writing, but a serialization failure can leave partial stream contents. Stage and reopen output before publishing it when the destination must survive a failed operation. OfficeIMO.Workflows provides that publication contract for .xps and .oxps through xps-pdf.

Page dimensions convert from XPS's 96 units per inch to PDF's 72 points per inch. The bridge preserves the fixed page canvas instead of reflowing it. Embedded text remains positioned vector outlines. A separate invisible text layer preserves native Unicode clusters for search and copy, including ligatures, surrogate pairs, spaces, right-to-left advances and nested affine transforms. Text inside decorative visual brushes is excluded.

Radial Repeat/Reflect brushes remain vector PDF shadings even when tangent bounds or high-frequency fields prevent finite stop expansion. Color interpolation, stop alpha and native outside-cone endpoint paint are retained. Print-condition conversion configured through XpsToPdfOptions.PdfOptions uses the caller-supplied CMYK ICC profile and bounded vector color samples; alpha remains independent. This color conversion alone does not establish PDF/X conformance.

Native StoryFragments and DocumentStructure supply paragraph, list, table and figure tags. Continued blocks share their logical containers across pages; declared story order can differ from physical page order. List markers and table cell spans retain their authored roles. Headers and footers remain searchable as artifacts outside the body structure tree. Page-local fragments use page order when no story addresses were authored. Unreferenced text remains in markup order in a generic division. Unstructured documents retain markup-order search text without inferred tags.

Authored AutomationProperties.Name and AutomationProperties.HelpText on a figure's named Path or Canvas become its PDF alternative text. Name precedes HelpText; multiple named targets follow the figure's reference order. Descriptions remain separate from the painted and searchable Unicode layer.

Selection regions follow cluster advances and glyph bounds, rather than inferred words. Source text remains searchable even when native clipping or opacity hides it; clipping is not text redaction. Glyph-only runs without UnicodeString have no recoverable logical text. Missing figure descriptions are not inferred, and export does not establish PDF/UA conformance.

Unsupported structure extensions, unresolved references and overlapping semantic ownership reject strict export. To retain the fixed canvas and markup-order search text without mapping native semantics, use:

File.WriteAllBytes("report.pdf", document.ToPdf(preserveLogicalStructure: false));

Safe web/mail links and native page, document and sequence targets become PDF link annotations. Named elements become destinations with page-space positions; DocumentStructure outlines retain their titles, order, depth and safe URI actions. Repeated page references keep local fragment links on their own occurrence, while absolute page references resolve to the first occurrence. Path target positions use conservative geometry bounds; link hit areas are rectangles.

Export rejects known conversion losses and unsafe or unresolved outline targets. Opaque XPS metadata, print tickets and signatures are not PDF preservation contracts. Consult the XPS support matrix and the PDF engine's own rendering limits before choosing an archival workflow.

Generated capability summary

This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.

Operation Supported Partial Preserved Rejected Unsupported Not applicable
Convert 0 1 0 0 0 0

The complete rows for OfficeIMO.Xps.Pdf are published in the generated operation contract.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OfficeIMO.Xps.Pdf:

Package Downloads
OfficeIMO.Workflows

Typed local document workflows that compose first-party OfficeIMO conversion, PDF, and provenance capabilities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.5.1 128 10/16/2026
3.4.5 552 10/10/2026