C# SDK

The .NET SDK provides a client for integrating PDFGate API endpoints into your C# applications. It supports .NET Standard 2.0+ and is designed for ASP.NET services, worker processes, and backend environments that require reliable, direct access to all API operations.

Source code: github.com/pdfgate/pdfgate-sdk-dotnet
Package: nuget.org/packages/PdfGate.net

Installation

Install the package with the .NET CLI, the NuGet CLI, or the Package Manager Console, then initialize the client with your API key.

.NET CLI
NuGet CLI
Package Manager Console

Create a client

The only requirement to create the client is your API key. Once initialized, the client is ready to call any of the available methods.

Generate and download a PDF

A common workflow is to generate a PDF first, then download the resulting file stream using the returned document id.

Core methods

MethodPurpose
GeneratePdfAsyncGenerate a PDF from HTML or a URL.
GetDocumentAsyncRetrieve document metadata and refreshed pre-signed URLs.
GetFileAsyncDownload the stored PDF stream for a document id.
UploadFileAsyncUpload a PDF file for later transformations.
FlattenPdfAsyncFlatten fillable form fields into a non-editable PDF.
WatermarkPdfAsyncApply text or image watermarks to a document.
ProtectPdfAsyncEncrypt a PDF and apply restrictions such as print or copy limits.
CompressPdfAsyncCompress a PDF and return the resulting document record.
ExtractPdfFormDataAsyncRead field values from a fillable PDF.

Related documentation

Use the SDK together with the main API documentation for request parameters, endpoint behavior, and workflow guides such as webhooks and PDF form fields.