SimdSkia.Pdf 0.1.0-preview.9

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

SimdSkia.Pdf

Optional C# PDF parsing and page rendering, using PdfPig 0.1.16 (Apache-2.0) for PDF structure/fonts and SimdSkia for rasterization. No Skia, PDFium, MuPDF, native font library or native zlib is used by this module.

New in 0.1.0-preview.9: optional PDF reading/rendering. The same release adds SKBitmap.GetPixels, GIF SKCodec, system font family discovery and the PDF writer in the compatibility module. Ordinary SimdSkia.Compatibility and SimdSkia.Avalonia users do not acquire the PDF parser dependency. Keep all direct SimdSkia package references on the same preview version.

dotnet add package SimdSkia.Pdf --version 0.1.0-preview.9

Every package includes CHANGELOG.md and NuGet release notes. This preview is a supported subset, not complete SkiaSharp or general PDF compatibility; see the release notes.

using SimdSkia.Pdf;
using SkiaSharp;

using var document = PdfReader.Open("input.pdf");
using var page = document.RenderPage(1, dpi: 144); // one-based page number
using var output = File.Create("page-1.png");
using var png = page.Bitmap.Encode(SKEncodedImageFormat.Png, 100);
png.SaveTo(output);
// Display the same bitmap in an existing SimdSkia canvas:
// canvas.DrawBitmap(page.Bitmap, 0, 0);

RenderedPdfPage owns its bitmap; dispose it after use. Returned pages outlive the reader. Operations on a reader are serialized; avoid disposing page pixels while another thread is drawing them. Input is limited to 256 MiB, each expanded Flate stream to 64 MiB, each raster page/image to 16 megapixels.

Supported and tested: multi-page PDF, ordered vector paths/fills, basic strokes, RGB/Gray images, JPEG, image soft masks, clipping, opacity, embedded TrueType/CFF outlines, page crop/rotation and managed compressed streams. Fonts without available outlines are rejected; system substitution is not automatic.

This is a subset renderer, not a general-purpose Acrobat/PDFium replacement. Annotations/form appearances, optional layers, PDF shadings/patterns, page/form transparency groups, graphics soft masks, non-normal blends, CMYK/ICC painting, dash/unsupported stroke styles, non-default UserUnit, vertical fonts, Matte soft-mask unmatting and text clipping are explicitly rejected. A PDF containing unsupported visible content fails instead of returning a falsely successful blank/partial page.

PDF generation is separately available through SKDocument.CreatePdf in SimdSkia.Compatibility: multiple raster pages, configurable DPI, metadata, lossless RGB or JPEG. It does not produce searchable text/vector content and does not implement PDF/A. SkiaSharp itself supplies PDF generation, not PDF input.

Examples from the repository root:

dotnet run -c Release --project examples/Documents -- artifacts/documents
dotnet run -c Release --project examples/PdfViewer -- tests/Pdf/Fixtures/external.pdf
dotnet run -c Release --project tests/Pdf

See docs/STANDALONE-COMPATIBILITY-2026-10-27.md for source API coverage, original comparisons, AOT verification and remaining differences. Windows was tested in this change; Linux/macOS execution of the new reader/viewer is not yet validated.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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

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-preview.9 38 10/27/2026

Preview 9 / 预览版 9:补齐 SKBitmap.GetPixels 真实像素指针、系统字体 FromFamilyName、GIF SKCodec、SKRoundRect/SaveLayer/Inflate 与采样重载;新增多页栅格 PDF 导出及可选纯托管 SimdSkia.Pdf 阅读模块。修复 VelaShell 字体 Try 回退和图片布局舍入边界,CPU/Direct2D/Vulkan 各 23 个常规场景通过,控件回归 9,750 项通过。仍有组合字符异常、复杂页面耗时、输入/Skia 专属预览及原版画质差距;PDF 仅支持明确子集。没有重测完整 CPU/GPU 性能,不沿用旧成绩宣称新版全面追平。12 个包统一版本,Avalonia 12.1.4、SkiaSharp 源码基线 3.119.4;不承诺二进制或全面兼容。完整更新、测试和限制见包内 CHANGELOG.md、README.md 和 https://github.com/donet-org-cn/SimdSkia/blob/main/docs/RELEASE-NOTES.md