PdfTurtleClientDotnet 2025.12.11.2016

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

PdfTurtle Client .NET

.NET Standard 2.0 library to use the PdfTurtle service

Nuget

HINT: This lib is in the beta.

See a working example in PdfTurtleClientDotnet.WebApiExample/Program.cs.

1. Prepare project

Get the package from nuget.

dotnet add package PdfTurtleClientDotnet
// register service
services.AddPdfTurtle("https://pdfturtle.gaitzsch.dev");
// resolve service over dependency injection
app.MapGet("/", (IPdfTurtleClient pdfTurtleClient) => { ... });

2. Design your PDF in the playground

Go to 🐢PdfTurtle-Playground, put an example model as JSON and design your PDF. Download the bundle as ZIP file and put it in your resources/assets.

3. Call the service with the client and your data

Call RenderBundleAsync to render the pdf to a Stream.

var pdfStream = await pdfTurtleClient.RenderBundleAsync(BUNDLE_AS_STREAM_OR_BYTES, MODEL_AS_OBJECT);

Done.

Hint: You can split your bundle

If you want to have the same header for all documents, you can create a ZIP file with only the header.html file. Now you can call the Service with multiple bundle files. The service will assemble the files together.

var pdfStream = await pdfTurtleClient.RenderBundleAsync(
        new [] { BUNDLE_WITHOUT_HEADER_AS_STREAM_OR_BYTES, HEADER_BUNDLE_AS_STREAM_OR_BYTES },
        MODEL_AS_OBJECT
    );

How to use - Alternative ways

Without template (plain HTML)

If the described way does not match your expectations, you can use a template engine of your choice (for example RazorLight) and render HTML directly with PdfTurtle.

var pdfStream = await pdfTurtleClient.RenderAsync(new RenderData() {
    ...
});

With template but no bundle

If you want to render a HTML template without any images or assets, you can use the RenderTemplateAsync function.

var pdfStream = await pdfTurtleClient.RenderTemplateAsync(new RenderTemplateData() {
    ...
});

Open TODOs

  • Working examples for all methods
  • Add documentation as comments
  • Tests
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2025.12.11.2016 406 12/11/2025
2025.12.11.1953 411 12/11/2025
2025.12.11.1952 406 12/11/2025
2025.12.11.1951 405 12/11/2025
2025.12.11.1912 407 12/11/2025
2025.12.11.1911 400 12/11/2025
2025.12.11.1909 408 12/11/2025
2025.12.11.1845 403 12/11/2025
2025.12.11.1844 412 12/11/2025
2023.6.13.1446 5,768 6/13/2023
2023.1.25.2030 871 1/25/2023
2023.1.25.2019 373 1/25/2023
2023.1.23.956 425 1/23/2023
2023.1.23.930 404 1/23/2023
2023.1.23.912 365 1/23/2023
2023.1.19.1115 421 1/19/2023
2023.1.19.936 406 1/19/2023
2023.1.19.844 395 1/19/2023
2023.1.19.805 383 1/19/2023
2023.1.18.1947 352 1/18/2023
2022.10.4.2112 531 10/4/2022
2022.10.4.1640 517 10/4/2022
2022.10.4.1619 488 10/4/2022
2022.10.2.1527 511 10/2/2022
2022.10.2.1517 503 10/2/2022
2022.9.29.1629 505 9/29/2022
2022.9.27.1644 556 9/27/2022
2022.9.26.1925 539 9/26/2022
2022.9.26.1912 525 9/26/2022
2022.9.26.1904 514 9/26/2022
2022.9.13.1618 517 9/13/2022
2022.9.3.1306 522 9/3/2022
2022.9.3.1305 528 9/3/2022
2022.9.3.1255 527 9/3/2022
2022.8.28.1952 531 8/28/2022
2022.8.27.1214 523 8/27/2022
0.1.0 558 8/25/2022