Skip to main content


Use the pdf endpoint to create pages, PDF reports from DLEX files, convert images to PDF, and merge PDFs into a combined PDF.

Use the pdf endpoint to create simple one-page PDF documents (cover pages for example), create documents/reports using DLEX files, convert images to PDFs, and to merge PDFs into a combined PDF. You can also combined the results from these tasks to merge into a single PDF document.

The pdf endpoint is much more complex than the other Cloud API endpoints. You must understand the pdf endpoint's schema for creating instructions. pdf.instructions - JSON Schema. Understanding the pdf endpoint requires understanding an instructions document, even if you plan on only using one of the client libraries and not calling the REST endpoint directly.


Refer to the following Users Guide page if you need more information illustrating how to call the endpoint directly as a REST call.

LanguageGitHub Users Guide ProjectClassLocation/Namespace/Package
C# PdfExample

The processing steps and syntax is the same for all four languages.

  • Create a new Pdf instance and create a new page as a PageInput instance.
  • Add page numbers using the PageNumberingElement class.
  • Format the PageNumberingElement instance and add them to the PageInput instance.
  • Call the Pdf instance's Process method and get the returned PDF.

Available on NuGet:

Install-Package DynamicPDF.API
using DynamicPDF.Api;
using DynamicPDF.Api.Elements;
using System;
using System.IO;

namespace PdfExample
class Program
static void Main(string[] args)
Run("DP.xxxx--api-key--xxxx", "C:/temp/dynamicpdf-api-usersguide-examples/");

public static void Run(String apiKey, String basePath)
Pdf pdf = new Pdf();
pdf.ApiKey = apiKey;
pdf.Author = "John Doe";
pdf.Title = "My Blank PDF Page";
PageInput pageInput = pdf.AddPage(1008, 612);
PageNumberingElement pageNumberingElement = new PageNumberingElement("1", ElementPlacement.TopRight);
pageNumberingElement.Color = RgbColor.Red;
pageNumberingElement.Font = Font.Courier;
pageNumberingElement.FontSize = 24;
PdfResponse pdfResponse = pdf.Process();
File.WriteAllBytes(basePath + "pdf-example-output.pdf", pdfResponse.Content);