Zorg.Pdf.Imaging 0.5.0

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

Zorg.Pdf.Imaging

Image handling for Zorg.Pdf, built on Zorg.Imaging. Managed code only, no native binaries; Native AOT and trimming work.

Pre-release: the API will change before 1.0.

Zorg.Pdf reads JPEG and PNG by itself. With ImagingProcessor it also:

  • reads WebP, GIF, BMP and TIFF;
  • turns camera photos the right way up from their EXIF orientation;
  • converts CMYK and ICC-profiled images to sRGB, or with KeepCmyk = true keeps CMYK inks for print;
  • shrinks images larger than they're printed at, to 300 dpi by default, and draws them at their original size.

JPEG and PNG that need none of that are embedded untouched.

using Zorg.Pdf;
using Zorg.Pdf.Imaging;

var options = new RenderOptions
{
    Fonts = fonts,
    ImageProcessor = new ImagingProcessor { Resolution = 200, JpegQuality = 85 },
};
await document.RenderAsync(output, options, cancellationToken);

Page previews

PdfPreview draws pages of a PDF that Zorg.Pdf wrote as PNG, so a person or an agent can check a layout by looking. It reads only Zorg.Pdf's own output and refuses anything else, and gives the same pixels on every machine. It draws with Zorg.Imaging's canvas.

byte[] png = await PdfPreview.RenderPagePngAsync(pdf, page: 0, new PreviewOptions { Dpi = 96 }, cancellationToken);

For agents, pass it to the tools: new PdfToolOptions { Render = ..., PreviewAsync = (pdf, page, ct) => PdfPreview.RenderPagePngAsync(pdf, page, cancellationToken: ct) }.

Documentation

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.5.0 48 11/15/2026
0.1.0-preview.1 49 11/15/2026