VOOZH about

URL: https://www.nuget.org/packages/Gotenberg.Sharp.API.Client/

⇱ NuGet Gallery | Gotenberg.Sharp.API.Client 3.0.0




👁 Image
Gotenberg.Sharp.API.Client 3.0.0

dotnet add package Gotenberg.Sharp.API.Client --version 3.0.0
 
 
NuGet\Install-Package Gotenberg.Sharp.API.Client -Version 3.0.0
 
 
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="Gotenberg.Sharp.API.Client" Version="3.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gotenberg.Sharp.API.Client" Version="3.0.0" />
 
Directory.Packages.props
<PackageReference Include="Gotenberg.Sharp.API.Client" />
 
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 Gotenberg.Sharp.API.Client --version 3.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Gotenberg.Sharp.API.Client, 3.0.0"
 
 
#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 Gotenberg.Sharp.API.Client@3.0.0
 
 
#: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=Gotenberg.Sharp.API.Client&version=3.0.0
 
Install as a Cake Addin
#tool nuget:?package=Gotenberg.Sharp.API.Client&version=3.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

<h1> <img src="https://raw.githubusercontent.com/ChangemakerStudios/GotenbergSharpApiClient/refs/heads/develop/resources/gotenberg-sharp-client.png" width="48" height="48" align="top" /> Gotenberg Sharp API Client </h1>

👁 NuGet version
👁 Downloads
👁 Build status

.NET C# client for Gotenberg v7 & v8 — a Docker-powered stateless API for converting & merging HTML, Markdown, and Office documents to PDF. Includes a configurable Polly retry policy with exponential backoff.

v3.0.0 — Screenshots, standalone PDF operations (flatten/rotate/split/encrypt), cross-cutting watermark & stamp options, LibreOffice conversion options, .NET 10/9/8 + netstandard 2.x. See for details.

Features

  • HTML/URL to PDF with Chromium (page properties, headers/footers, cookies, wait conditions)
  • Screenshots of HTML or URLs as PNG, JPEG, or WebP
  • Office to PDF via LibreOffice (100+ formats, image compression, watermarks)
  • PDF Manipulation — merge, flatten, rotate, split, encrypt, watermark, stamp
  • PDF/A & PDF/UA compliance, metadata read/write
  • Webhooks for async PDF generation
  • DI-Ready with Polly retry policies

Quick Start

docker run --rm -p 3000:3000 gotenberg/gotenberg:latest
dotnet add package Gotenberg.Sharp.Api.Client
// Startup.cs
services.AddOptions<GotenbergSharpClientOptions>()
 .Bind(Configuration.GetSection("GotenbergSharpClient"));
services.AddGotenbergSharpClient();

HTML to PDF

var builder = new HtmlRequestBuilder()
 .AddDocument(doc => doc.SetBody("<html><body><h1>Hello PDF!</h1></body></html>"))
 .WithPageProperties(pp => pp.UseChromeDefaults());

var result = await sharpClient.HtmlToPdfAsync(builder);

Screenshot

var builder = new ScreenshotHtmlRequestBuilder()
 .AddDocument(doc => doc.SetBody("<html><body><h1>Screenshot!</h1></body></html>"))
 .WithScreenshotProperties(p => p.SetSize(1280, 720).SetFormat(ScreenshotFormat.Png));

var imageStream = await sharpClient.ScreenshotHtmlAsync(builder);

Office to PDF

var builder = new MergeOfficeBuilder()
 .WithAsyncAssets(async a => a.AddItems(await GetDocsAsync(sourceDir)))
 .SetLibreOfficeOptions(o => o.SetQuality(85).SetExportBookmarks())
 .SetPdfOutputOptions(o => o.SetPdfFormat(PdfFormat.A2b));

var result = await sharpClient.MergeOfficeDocsAsync(builder);

PDF Operations

// Rotate
using var rotated = await sharpClient.ExecutePdfEngineAsync(
 PdfEngineBuilders.Rotate(90).WithPdfs(a => a.AddItem("doc.pdf", bytes)));

// Encrypt
using var encrypted = await sharpClient.ExecutePdfEngineAsync(
 PdfEngineBuilders.Encrypt("reader123", "admin456").WithPdfs(a => a.AddItem("doc.pdf", bytes)));

// Watermark (inline, on any conversion)
var builder = new HtmlRequestBuilder()
 .AddDocument(doc => doc.SetBody(html))
 .SetWatermarkOptions(w => w.SetTextWatermark("DRAFT"));

Documentation

See the full documentation for:

Examples

See the for complete working console applications.

Release History

See for the full release history.

Star History

<a href="https://www.star-history.com/?repos=ChangemakerStudios%2FGotenbergSharpApiClient&type=date&legend=bottom-right"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=ChangemakerStudios/GotenbergSharpApiClient&type=date&theme=dark&legend=bottom-right" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=ChangemakerStudios/GotenbergSharpApiClient&type=date&legend=bottom-right" /> <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=ChangemakerStudios/GotenbergSharpApiClient&type=date&legend=bottom-right" /> </picture> </a>

License

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Gotenberg.Sharp.API.Client:

Package Downloads
SpCraft.Net.Common.Pdf

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 49,313 4/6/2026
2.8.5 15,711 3/27/2026
2.8.4 213,118 10/18/2025
2.8.3 32,115 10/6/2025
2.8.1 571 10/5/2025
2.8.0 346,846 3/25/2025
2.5.0 58,301 2/7/2025
2.4.0 270,327 8/10/2024
2.3.0 126,002 4/17/2024
2.2.2 70,920 1/30/2024
2.1.1 334,103 10/1/2022
2.0.2 70,776 8/30/2022
2.0.1 1,593 8/30/2022
2.0.0-alpha0002 36,314 3/3/2022
1.2.0 111,400 5/11/2021
Loading failed

v3.0.0 - Major release: Screenshot operations (HTML/URL to PNG/JPEG/WebP). Standalone PDF engine operations (flatten, rotate, split, encrypt, metadata). Cross-cutting watermark, stamp, rotation, and split options. LibreOffice conversion options. PDF encryption. Additional Chromium fields. Dropped .NET 5/6/7; added .NET 9/10. Namespace reorganization (builders moved to Application layer). See CHANGES.MD for full details.
     v2.8.5 - Added support for the GenerateTaggedPdf flag.
     v2.8.4 - Fixed hybrid configuration for basic authentication credentials.
     v2.8.3 - Added programmatic configuration support. Comprehensive documentation improvements.
     v2.8.1 - Added cookie support, basic auth, SinglePage property.
     v2.8 - PDF formatting improvements, flatten support.
     v2.0 - Upgraded to support Gotenberg v7.