ModernPDF 0.2.1

dotnet add package ModernPDF --version 0.2.1
                    
NuGet\Install-Package ModernPDF -Version 0.2.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="ModernPDF" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModernPDF" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="ModernPDF" />
                    
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 ModernPDF --version 0.2.1
                    
#r "nuget: ModernPDF, 0.2.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 ModernPDF@0.2.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=ModernPDF&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=ModernPDF&version=0.2.1
                    
Install as a Cake Tool

ModernPDF

ModernPDF is a managed, cross-platform .NET 10 library for reading, writing, editing, and securing PDF documents.

Key features

  • Create, open, edit, and save PDF documents
  • Text extraction
  • Page/content editing
  • JPEG/PNG image page authoring and replacement
  • Vector shape drawing with styling, transforms, gradients, clipping, and shape IDs
  • Hard/soft redaction APIs (literal and pattern-based)
  • Password security (RC4/AES standard handler profiles)
  • Detached digital signatures (CMS callback + ByteRange patching)
  • TrueType font embedding with fallback chains, shaping, and glyph subsetting

Install

dotnet add package ModernPDF

Quick start

using ModernPDF;

// Create a new document and add a page with text
PdfDocument document = PdfDocument.Create();
document.AddTextPage("Hello from ModernPDF!");

// Save
document.Save("hello.pdf");

// Reopen and extract text
PdfDocument reopened = PdfDocument.Open("hello.pdf");
string text = reopened.ExtractText();

Font and rich text example

PdfDocument document = PdfDocument.Create();
document.DefaultTextOptions = new PdfTextOptions
{
    TrueTypeFontPath = @"C:\fonts\MyFont.ttf",
    FallbackTrueTypeFontPaths = [@"C:\fonts\Fallback.ttf"],
    SubsetFont = true
};

document.AddRichTextPage(
[
    new PdfTextSpan { Text = "Normal " },
    new PdfTextSpan { Text = "Large", FontSize = 24 },
    new PdfTextSpan { Text = " text", FontSize = 12 }
]);
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1 44 5/17/2026
0.2.0 48 5/17/2026
0.1.0-prerelease 49 5/10/2026