C# (.NET) Client Library
The DynamicPDF API provides a full‑featured client library for C#/.NET that simplifies integration with the REST endpoints.
The C# .NET client library is the official way to integrate the DynamicPDF API into any .NET application. It provides high-level classes for generating PDFs, converting HTML or images to PDF, merging multiple documents, extracting text and metadata, and performing detailed PDF inspection — all without manually constructing raw HTTP requests.With this library, you can access the full functionality of the DynamicPDF API, including creating new PDF documents, merging or splitting existing PDFs, filling and flattening forms, stamping text and images, extracting XMP or document information, rasterizing pages, and applying encryption or other security settings. The DynamicPDF API exposes a comprehensive set of PDF-focused endpoints that support generation, conversion, processing, analysis, and secure delivery of PDF files.
The DynamicPDF API offers clean, intuitive wrappers around the following REST endpoints:
dlex-layoutfor creating dynamic PDF reports from DLEX templates and JSON data,image-infofor extracting detailed metadata from images,pdffor creating and manipulating PDFs, merging documents, and converting HTML, Word, and Excel files to PDF,pdf-infofor retrieving document information and metadata from existing PDFs,pdf-security-infofor obtaining PDF encryption details and security settings,pdf-textfor extracting text content from PDF pages, andpdf-xmpfor reading embedded XMP metadata from PDF files.
Installation
Obtain the NuGet package at https://www.nuget.org/packages/DynamicPDF.API
dotnet add package DynamicPDF.API
Source & Repo
- GitHub Repo: https://github.com/dynamicpdf-api/dotnet-client
- Sample Applications: https://github.com/dynamicpdf-api/dotnet-client-examples
Usage Example
public static void Merge(string apiKey)
{
Pdf pdf = new Pdf();
pdf.ApiKey = apiKey;
var inputA = pdf.AddPdf("DocA.pdf");
pdf.AddPdf("DocB.pdf");
pdf.AddPdf("DocC.pdf");
PdfResponse pdfResponse = pdf.Process();
File.WriteAllBytes("output.pdf", pdfResponse.Content);
}