X39.Solutions.PdfTemplate 8.0.1

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

X39.Solutions.PdfTemplate

X39.Solutions.PdfTemplate is the compatibility bridge for existing consumers of the original package. It preserves the legacy AddPdfTemplateService() and Generator entry points while delegating the current implementation to Papercraft Core plus the SkiaSharp renderer.

Use this package when existing code already references X39.Solutions.PdfTemplate. New applications should usually start with X39.Solutions.Papercraft.

Package Role

Area Provided by this package
Legacy DI entry point services.AddPdfTemplateService()
Legacy render facade Generator
Compatibility builder PdfTemplateServiceBuilder
Migration support Type forwarders for Papercraft contracts and controls
Default backend SkiaSharp through X39.Solutions.Papercraft.Rendering.SkiaSharp

The package references X39.Solutions.Papercraft, X39.Solutions.Papercraft.Core, X39.Solutions.Papercraft.Rendering.SkiaSharp, Microsoft.Extensions.DependencyInjection.Abstractions and X39.Util.

Register Services

using Microsoft.Extensions.DependencyInjection;
using X39.Solutions.PdfTemplate;

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

AddPdfTemplateService() registers the Papercraft SkiaSharp renderer and the legacy Generator wrapper. It also returns PdfTemplateServiceBuilder so existing customization code can continue to add controls, functions and transformers.

services.AddPdfTemplateService((builder) =>
{
    builder.AddFunction<MyFunction>();
    builder.ReplaceControl<MyControl>();
});

Render Through The Legacy Generator

using System.Globalization;
using System.Xml;
using Microsoft.Extensions.DependencyInjection;
using X39.Solutions.PdfTemplate;

await using var provider = services.BuildServiceProvider();
using var generator = provider.GetRequiredService<Generator>();

generator.TemplateData.SetVariable("CustomerName", "Ada Lovelace");

using var reader = XmlReader.Create(templateStream);
await using var output = File.Create("document.pdf");

await generator.GeneratePdfAsync(output, reader, CultureInfo.InvariantCulture);

Generator.GenerateLoweredXmlAsync() writes backend-free lowered XML diagnostics for the same template data. Generator.GenerateBitmapsAsync() is still available for callers that expect SkiaSharp bitmap output.

Migration Notes

Existing code can keep using:

  • services.AddPdfTemplateService()
  • Generator
  • Generator.TemplateData
  • Generator.GenerateLoweredXmlAsync(...)
  • PdfTemplateServiceBuilder

New code can move incrementally to:

  • services.AddPapercraft()
  • PapercraftRenderer
  • PapercraftRenderOptions
  • RenderOutput and RasterPageRenderOutput

The template language and default XML controls remain documented in the user manual.

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
8.0.1 52 6/13/2026
8.0.0 72 6/11/2026
7.1.0 84 6/9/2026
7.0.0 93 6/9/2026
6.1.0.56 109 5/27/2026
6.0.0.53 102 5/27/2026
5.3.1.52 173 2/8/2026
5.3.0.51 124 2/8/2026
5.1.2.49 345 11/3/2024
5.1.1.48 230 10/31/2024
5.1.0.47 264 10/31/2024 5.1.0.47 is deprecated.
5.0.0.46 248 10/25/2024
4.1.0.45 333 7/5/2024
4.1.0.44 300 6/24/2024
4.0.1.42 648 5/10/2024
4.0.0.38 338 2/1/2024
Loading failed