SimdSkia.Pdf 0.1.0-preview.10

This is a prerelease version of SimdSkia.Pdf.
dotnet add package SimdSkia.Pdf --version 0.1.0-preview.10
                    
NuGet\Install-Package SimdSkia.Pdf -Version 0.1.0-preview.10
                    
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.10" />
                    
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.10" />
                    
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.10
                    
#r "nuget: SimdSkia.Pdf, 0.1.0-preview.10"
                    
#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.10
                    
#: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.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SimdSkia.Pdf&version=0.1.0-preview.10&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 is used for PDF rendering. PDF Flate streams use the managed implementation; image codecs may use the explicitly permitted .NET native compression.

0.1.0-preview.10 requires .NET 10. Full Sdcb.SimdCodecs 1.2.0 integration is inherited through Imaging. The 123-process CPU/GPU/codec test record is included in CHANGELOG.md: CPU controls 0.891→0.549 ms, but working set 90.39→109.81 MiB, slow PNG cases and original 画质 failures remain. JPEG 3/24 strict cases and CPU/GPU full-page quality still fail; no thresholds were relaxed. See the measured report. This is not a general PDF compatibility or performance claim.

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.10

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 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.1.0-preview.10 43 11/1/2026
0.1.0-preview.9 57 10/27/2026

Preview 10 / 预览版 10:升级 .NET 10 / C# 14,完整接入 Sdcb.SimdCodecs 1.2.0,替换 JPEG/PNG/GIF 像素编解码并扩展 WebP/动画、TIFF 等格式;允许 .NET 系统原生压缩,仍不调用 Google Skia 绘图。新增 123 个独立进程的同机 CPU/Vulkan/Direct2D/JPEG/PNG 对照:CPU 控件 0.891→0.549 ms,JPEG 解码快约 2.27–2.90 倍;仅限 .NET 10 JIT 与已测场景。CPU 工作集仍高约 18%–22%,纹理 PNG 解码耗时 2.03 倍,UI PNG 编码慢约 19%,JPEG 文件大小有增加;整页画质 CPU 0/3、GPU 0/12 达标,原版 JPEG 联合回读 3/24 组失败,未放宽阈值。12 包统一版本,Avalonia 12.1.4 / SkiaSharp 源码基线 3.119.4 不变;不兼容 .NET 8,不承诺全面或二进制替换。完整测试记录、性能图和限制见包内 CHANGELOG.md、README.md 及 https://github.com/donet-org-cn/SimdSkia/blob/main/docs/SKIA-COMPARISON-2026-11-01.md