X39.Solutions.Papercraft.Rendering.SkiaSharp 8.1.1

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

X39.Solutions.Papercraft.Rendering.SkiaSharp

X39.Solutions.Papercraft.Rendering.SkiaSharp is the default Papercraft render backend. It renders Papercraft display lists through SkiaSharp and supports PDF output plus PNG raster output.

Use this package when you want to choose the SkiaSharp backend explicitly. Most application code can reference X39.Solutions.Papercraft instead, which registers this renderer automatically.

Package Role

Area Provided by this package
DI entry point services.AddPapercraftSkiaSharpRenderer()
Backend implementation SkiaSharpRenderBackend
Display-list renderer SkiaSharpDisplayListRenderer
Runtime services SkPaintCache, SkiaSharp text service
Supported media types application/pdf, image/png

The backend declares support for PDF output, raster image output, multipage documents, text measurement and drawing, images, clipping, transparency, fonts, color and absolute positioning.

Register The Renderer

using Microsoft.Extensions.DependencyInjection;
using X39.Solutions.Papercraft.Rendering.SkiaSharp;

var services = new ServiceCollection();
services.AddPapercraftSkiaSharpRenderer();

AddPapercraftSkiaSharpRenderer() also registers Papercraft Core services. After registration, resolve Papercraft from the service provider and create a PapercraftSession to render through the selected backend.

Output Paths

Render a PDF:

var papercraft = serviceProvider.GetRequiredService<Papercraft>();
await using var session = papercraft.CreateSession();

await session.RenderAsync(
    xmlReader,
    new RenderOutput(RenderTarget.Pdf, outputStream),
    CultureInfo.InvariantCulture);

Render each page as PNG:

await session.RenderRasterPagesAsync(
    xmlReader,
    new RasterPageRenderOutput(
        PapercraftMediaTypes.ImagePng,
        static (page, cancellationToken) =>
            ValueTask.FromResult<Stream>(File.Create($"page-{page.PageNumber}.png"))),
    CultureInfo.InvariantCulture);

Single-stream PNG output is supported for one-page documents. For multi-page raster output, use RenderRasterPagesAsync.

Platform Notes

This package references SkiaSharp. Applications running on Linux should also reference the matching SkiaSharp native assets package, for example:

dotnet add package SkiaSharp.NativeAssets.Linux

The test and benchmark projects reference native asset packages explicitly because they execute renderer code.

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 (2)

Showing the top 2 NuGet packages that depend on X39.Solutions.Papercraft.Rendering.SkiaSharp:

Package Downloads
X39.Solutions.PdfTemplate

Papercraft is a template-driven document rendering engine for XML templates. This package is the X39.Solutions.PdfTemplate compatibility bridge and keeps the existing PDF generation UX available. The current default backend uses SkiaSharp for PDF and raster rendering and supports a variety of controls for creating complex layouts. You can easily integrate .NET objects into your templates by using so-called "variables" (`@myVariable`) or pull data from a database as needed, by providing a custom function (`@myFunction()`). You may even create your own controls by deriving from the `Control` base class!

X39.Solutions.Papercraft

Papercraft facade package for the default application developer path. Default rendering is backed by the SkiaSharp renderer while renderer-neutral contracts are forwarded to Papercraft Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.1.1 71 6/21/2026
8.1.0 114 6/17/2026
8.0.1 123 6/13/2026
8.0.0 125 6/11/2026
7.1.0 119 6/9/2026
7.0.0 120 6/9/2026