VOOZH about

URL: https://www.nuget.org/packages/Unchained.Pdf.Rendering/

⇱ NuGet Gallery | Unchained.Pdf.Rendering 0.1.0


ο»Ώ

πŸ‘ Image
Unchained.Pdf.Rendering 0.1.0

dotnet add package Unchained.Pdf.Rendering --version 0.1.0
 
 
NuGet\Install-Package Unchained.Pdf.Rendering -Version 0.1.0
 
 
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="Unchained.Pdf.Rendering" Version="0.1.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unchained.Pdf.Rendering" Version="0.1.0" />
 
Directory.Packages.props
<PackageReference Include="Unchained.Pdf.Rendering" />
 
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 Unchained.Pdf.Rendering --version 0.1.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Unchained.Pdf.Rendering, 0.1.0"
 
 
#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 Unchained.Pdf.Rendering@0.1.0
 
 
#: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=Unchained.Pdf.Rendering&version=0.1.0
 
Install as a Cake Addin
#tool nuget:?package=Unchained.Pdf.Rendering&version=0.1.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Unchained.Pdf.Rendering

PDF page rasterization for .NET β€” render any PDF page to a PNG image with hardware-accurate font shaping. Supports all platforms out of the box.

Targets: net8.0 Β· net9.0 Β· net10.0
License: MIT


Installation

<PackageReference Include="Unchained.Pdf.Rendering" Version="0.1.0" />

This single package reference pulls everything needed:

  • Unchained.Pdf β€” the core PDF engine
  • FreeTypeSharp β€” FreeType2 bindings + native binaries (Windows, macOS, linux-x64)
  • Unchained.Drawing.Runtimes β€” the FreeType2 binary for linux-arm64 (the one platform FreeTypeSharp omits)
  • HarfBuzzSharp β€” text shaping native assets for your platform

No additional setup required on any supported platform.


Usage

using Unchained.Pdf.Engine;
using Unchained.Pdf.Rendering.Engine;

var processor = new DocumentProcessor();
var renderer = new PdfRenderer();

await using var doc = await processor.LoadAsync("document.pdf");

// Render a single page
byte[] png = await renderer.RenderPageAsync(doc.Pages[1], new RenderOptions(Dpi: 150));
await File.WriteAllBytesAsync("page1.png", png);

// Render all pages
IReadOnlyList<byte[]> pages = await renderer.RenderDocumentAsync(doc, new RenderOptions(Dpi: 72));
for (int i = 0; i < pages.Count; i++)
 await File.WriteAllBytesAsync($"page{i + 1}.png", pages[i]);

// With cancellation
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var pagesWithCancel = await renderer.RenderDocumentAsync(doc, new RenderOptions(), cts.Token);

RenderOptions

// 72 DPI β€” screen preview quality
new RenderOptions(Dpi: 72)

// 150 DPI β€” general purpose
new RenderOptions(Dpi: 150)

// 300 DPI β€” print quality
new RenderOptions(Dpi: 300)

Check FreeType availability

if (!PdfRenderer.FreeTypeAvailable)
{
 Console.WriteLine("FreeType2 native library not found β€” rendering skipped.");
 return;
}

Rendering capabilities

Feature Support
Text rendering βœ… Embedded PDF fonts; Standard 14 substitutes (DejaVu); NotoSans Unicode fallback
Text shaping βœ… HarfBuzz GSUB/GPOS β€” ligatures, RTL (Arabic, Hebrew), Devanagari, CJK
Vector graphics βœ… Paths, rectangles, BΓ©zier curves, fill + stroke
Raster images βœ… DeviceRGB image XObjects (all 9 stream filters supported)
Color spaces βœ… RGB, grayscale, CMYK (approximate)
CTM transforms βœ… Full 2D matrix transforms on all content
Output format PNG (pure managed encoder, no external deps)

Platform support

The native FreeType2 binary is automatically selected and deployed for your platform:

Platform RID
Windows x64 win-x64
Windows arm64 win-arm64
Linux x64 linux-x64
Linux arm64 linux-arm64
macOS x64 (Intel) osx-x64
macOS arm64 (Apple Silicon) osx-arm64

Bundled fonts

Standard 14 PDF fonts are substituted with embedded open-licensed typefaces:

Standard 14 font Substitute License
Helvetica (all variants) DejaVu Sans Bitstream Vera Fonts Copyright
Times (all variants) DejaVu Serif Bitstream Vera Fonts Copyright
Courier (all variants) DejaVu Sans Mono Bitstream Vera Fonts Copyright
Any unrecognised font NotoSans-Regular SIL OFL

Embedded PDF fonts (Type1, TrueType, CFF) are loaded and rendered directly with full fidelity.


License

MIT. All bundled components (FreeType2 FTL, HarfBuzz MIT, DejaVu/NotoSans SIL OFL) are permissive-licensed and safe for commercial use.

GitHub Β· Report an issue

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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.1.0 45 6/25/2026
0.1.0-rc.4 51 6/20/2026