![]() |
VOOZH | about |
dotnet add package Unchained.Pdf.Rendering --version 0.1.0
NuGet\Install-Package Unchained.Pdf.Rendering -Version 0.1.0
<PackageReference Include="Unchained.Pdf.Rendering" Version="0.1.0" />
<PackageVersion Include="Unchained.Pdf.Rendering" Version="0.1.0" />Directory.Packages.props
<PackageReference Include="Unchained.Pdf.Rendering" />Project file
paket add Unchained.Pdf.Rendering --version 0.1.0
#r "nuget: Unchained.Pdf.Rendering, 0.1.0"
#:package Unchained.Pdf.Rendering@0.1.0
#addin nuget:?package=Unchained.Pdf.Rendering&version=0.1.0Install as a Cake Addin
#tool nuget:?package=Unchained.Pdf.Rendering&version=0.1.0Install as a Cake Tool
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
<PackageReference Include="Unchained.Pdf.Rendering" Version="0.1.0" />
This single package reference pulls everything needed:
Unchained.Pdf β the core PDF engineFreeTypeSharp β 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 platformNo additional setup required on any supported platform.
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);
// 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)
if (!PdfRenderer.FreeTypeAvailable)
{
Console.WriteLine("FreeType2 native library not found β rendering skipped.");
return;
}
| 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) |
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 |
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.
MIT. All bundled components (FreeType2 FTL, HarfBuzz MIT, DejaVu/NotoSans SIL OFL) are permissive-licensed and safe for commercial use.
| 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. |
This package is not used by any NuGet packages.
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 |