Skip to main content


Use the pdf-info endpoint to upload a PDF document and return JSON describing the PDF.

The pdf-info endpoint takes a PDF document and returns the following data as JSON:

  • the metadata (title, author, keywords etc)
  • any custom properties in the PDF,
  • an array of pages with the size of each page,
  • and an array of form fields and their name, value and available values (for select boxes).

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

Run In Postman


The PdfInfo class encapsulates the pdf-info endpoint. A PdfInfo instance takes a PdfResource instance. A PdfResource is constructed from a PDF coming from a file, a byte array, or Stream.

public PdfInfo(PdfResource resource);

public class PdfResource : Resource
public PdfResource(string filePath, string resourceName = null);
public PdfResource(byte[] value, string resourceName = null);
public PdfResource(Stream data, string resourceName = null);
Source: PdfInfo.cs Source: PdfResource.cs


A complete example is available via one of the following GitHub projects depending upon the language you wish to use.

LanguageGitHub Users Guide ProjectClassLocation/Package/Namespace
C# PdfInfoExample

The processing steps and syntax for all five languages are similar.

  • Create a PdfInfo instance and pass a PdfResource instance to the PdfInfo instance.
  • Call the PdfInfo instance's Process method to return the PDF's metadata as JSON.
using DynamicPDF.Api;
using System;

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

public static void Run(string key, string basePath)
PdfResource resource = new PdfResource(basePath + "/DocumentA.pdf");
PdfInfo pdfInfo = new PdfInfo(resource);
pdfInfo.ApiKey = key;
PdfInfoResponse response = pdfInfo.Process();
Source: PdfInfoExample
   Follow us on social media for latest news!