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
<PackageReference Include="X39.Solutions.PdfTemplate" Version="8.0.1" />
<PackageVersion Include="X39.Solutions.PdfTemplate" Version="8.0.1" />
<PackageReference Include="X39.Solutions.PdfTemplate" />
paket add X39.Solutions.PdfTemplate --version 8.0.1
#r "nuget: X39.Solutions.PdfTemplate, 8.0.1"
#:package X39.Solutions.PdfTemplate@8.0.1
#addin nuget:?package=X39.Solutions.PdfTemplate&version=8.0.1
#tool nuget:?package=X39.Solutions.PdfTemplate&version=8.0.1
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()GeneratorGenerator.TemplateDataGenerator.GenerateLoweredXmlAsync(...)PdfTemplateServiceBuilder
New code can move incrementally to:
services.AddPapercraft()PapercraftRendererPapercraftRenderOptionsRenderOutputandRasterPageRenderOutput
The template language and default XML controls remain documented in the user manual.
Related Projects
X39.Solutions.Papercraft: default facade for new application code.X39.Solutions.Papercraft.Core: renderer-neutral contracts and runtime.X39.Solutions.Papercraft.Rendering.SkiaSharp: backend used by this compatibility bridge.../../docs/manual/migration-to-papercraft.md: migration manual.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.8)
- X39.Solutions.Papercraft (>= 8.0.1)
- X39.Solutions.Papercraft.Core (>= 8.0.1)
- X39.Solutions.Papercraft.Rendering.SkiaSharp (>= 8.0.1)
- X39.Util (>= 1.0.0.56)
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.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 |