PdfEngine.Vector 0.2.0-preview.1

This is a prerelease version of PdfEngine.Vector.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PdfEngine.Vector --version 0.2.0-preview.1
                    
NuGet\Install-Package PdfEngine.Vector -Version 0.2.0-preview.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="PdfEngine.Vector" Version="0.2.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PdfEngine.Vector" Version="0.2.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="PdfEngine.Vector" />
                    
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 PdfEngine.Vector --version 0.2.0-preview.1
                    
#r "nuget: PdfEngine.Vector, 0.2.0-preview.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 PdfEngine.Vector@0.2.0-preview.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=PdfEngine.Vector&version=0.2.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PdfEngine.Vector&version=0.2.0-preview.1&prerelease
                    
Install as a Cake Tool

PdfEngine.Vector

A PDF engine in pure C#, with no native code: parser and repair, document model, content stream interpreter (display list), text extraction and search, annotations, forms, digital signatures, redaction, page organisation and saving. It targets net9.0.

It is the engine of PDF Viewer. To draw pages, add a renderer: PdfEngine.Vector.Skia (portable).

using PdfEngine.Vector.Document;
using PdfEngine.Vector.Text;

using var doc = await PdfVectorDocument.OpenAsync("input.pdf");
Console.WriteLine($"{doc.PageCount} pages");
Console.WriteLine(await new PdfVectorTextService().ExtractPageTextAsync(doc, 1));

Colour profiles

The engine reads no colour profile from the machine, so it converts colour the same way on every platform. DeviceCMYK uses a built-in model of U.S. Web Coated (SWOP). To use installed profiles, register a provider once at start-up, before documents are opened:

using PdfEngine.Vector.Color;

ColorProfiles.Register(new MyColorProfiles()); // implements IColorProfileProvider

GetDisplayCmykProfile gives the profile for DeviceCMYK on screen (null: the built-in model). GetOutputIntentCmykProfile gives the CMYK profile that PDF/A conversion embeds as the output intent when the caller sets no CmykProfile (null: none). The Windows desktop app registers the profiles Windows and Adobe applications install.

Behaviour change on Windows. Earlier builds found these profiles themselves on Windows. A Windows host that registers no provider now gets the built-in SWOP model for display, and PDF/A conversion adds no RSWOP.icm output intent by itself. To keep the earlier results, register a Windows provider once at start-up. In the repository, PdfEngine.Vector.Windows has one (it is not a NuGet package; its WindowsColorProfileProvider is about 20 lines to copy):

ColorProfiles.Register(PdfEngine.Vector.Windows.WindowsColorProfileProvider.Instance);

The API is not stable before version 1.0. Licence: MIT. Third-party data inside the package (the Adobe predefined CJK CMaps, BSD-3-Clause) is listed in THIRD_PARTY_NOTICES.md in the package.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 was computed.  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. 
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 PdfEngine.Vector:

Package Downloads
PdfEngine.Vector.Skia

Portable Skia (CPU raster) renderer for the PdfEngine.Vector display list: renders PDF pages to BGRA pixels on any platform that SkiaSharp supports.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.1 74 10/30/2026
0.2.0-preview.1 78 10/28/2026
0.1.0-preview.1 78 10/25/2026