Cross-Platform Support

Designed for C# and VB.NET — Runs on .NET 10, 9, 8, .NET Framework 4.6.2+.

DevExpress PDF Document API – Quick Start

Set up DevExpress PDF Document API on your machine and build
document processing workflows in your next great DevExpress-powered .NET application.

Windows-based Installer

Run our Unified Installer (includes all DevExpress components and libraries) to start your free 30-day trial.

Free 30-Day Trial

NuGet

Install the DevExpress.Document.Processor NuGet package to start your free 30-day trial. Copy the installation command and add the package to your project using NuGet CLI.

dotnet add package DevExpress.Document.ProcessorCopy

Required Namespace and Class

Namespace:

Class:

DevExpress.Pdf

PdfDocumentProcessor

Quick Start Code

  • C#
using DevExpress.Pdf;
using DevExpress.Drawing;
using System.Drawing;

// Create a PDF and add a new page with text and logo
using var pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.CreateEmptyDocument();
Copy

Supported PDF Structures

Use DevExpress PDF Document API to add, access, modify, and preview the following PDF elements.

Annotations

Attachments

Bookmarks

Links

Interactive Forms

Digital Signatures

Layers

Document Properties

XMP Metadata

JPX / JBIG

Patterns

Shapes

Transparency Groups

Type3 Fonts

Generate and Modify PDF Files

Use the DevExpress PDF Document API to create, modify, and organize PDF files in your
.NET applications with ease. Merge, split, and duplicate PDF documents.
Access pages, metadata, and content elements.

Merge Multiple PDFs

Combine multiple PDF documents into a single, unified file. Preserve bookmarks, annotations, forms, and internal document structure.

Documentation | Demo

Split PDFs into Separate Files

Split large or multi-section files by extracting individual pages or custom page ranges into new PDF documents.

Documentation | Demo

Organize Pages – Add, Remove, Reorder

Insert pages from other documents, delete unwanted pages, duplicate existing pages, or rearrange their order to structure content exactly as required.

Documentation

Format Pages – Resize, Rotate, Scale, Flip

Adjust page dimensions and orientation, scale or flip content, reposition text and graphics to achieve consistent formatting across your PDFs.

Documentation

Clear Content

Remove all content from a page or selected areas – text, graphics, fields, and annotations. Create blank canvases ready for new content generation.

Documentation

Generate and Insert Content

Add text, shapes, raster and SVG images, or stamp content onto any page at any position.

Documentation

Set Viewer Preferences

Define how PDFs should be displayed in external PDF viewers – page layout, initial zoom, fullscreen mode, visible navigation panels, and more.

Documentation

Modify Document Properties

Update document information such as title, author, subject, keywords, and custom properties to improve classification and searchability.

  • C#
using DevExpress.Pdf;

// Merge multiple documents into one
using var pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.CreateEmptyDocument();

using var doc1 = new MemoryStream(File.ReadAllBytes("Document1.pdf"));
pdfProcessor.AppendDocument(doc1);
using var doc2 = new MemoryStream(File.ReadAllBytes("Document2.pdf"));
pdfProcessor.AppendDocument(doc2);
// Set properties for the merged document
pdfProcessor.Document.Author = "Jane Doe";
pdfProcessor.Document.Title = "Merged PDF Document";
pdfProcessor.Document.ViewerPreferences.DisplayDocTitle = true;
using var mergedStream = new MemoryStream();
pdfProcessor.SaveDocument(mergedStream);

// Extract pages to separate documents
using var targetPdfProcessor = new PdfDocumentProcessor();
targetPdfProcessor.CreateEmptyDocument();

targetPdfProcessor.Document.Pages.Add(pdfProcessor.Document.Pages[0]);
targetPdfProcessor.Document.Pages.Add(pdfProcessor.Document.Pages[1]);

using var splitStream = new MemoryStream();
targetPdfProcessor.SaveDocument(splitStream);
Copy

PDF Protection and Digital Signatures

Secure PDF documents and control access using built-in encryption, password protection, and digital signature support. Programmatically apply, remove, validate, and customize digital signatures in your PDF files. Permanently remove
personal and sensitive content from PDFs using built-in redaction capabilities.

Encrypt PDFs with Passwords

Apply user/owner passwords and encrypt documents using modern cryptographic standards (AES256, AES128, ARC4). Restrict printing, editing, copying, or content extraction.

Documentation | Demo

Sign a PDF with a Digital Signature

Apply certificate-based digital signatures to ensure document authenticity and integrity.

Documentation | Demo

Apply Multiple Signatures

Add multiple PKCS#7 signatures with X.509 certificates in a single document to support multi-party review and approval workflows.

Documentation

Add Document-Level Timestamp

Timestamp PDFs offer a trusted record of when a document was signed or finalized.

Documentation

Customize Signature Appearance

Customize signature widgets programmatically – position, text, images, branding, and style.

Documentation | Demo

Verify a Signature

Ensure signature validity and review related attributes (time of signing, the signer’s identity, etc.). Obtain certificate revocation info based on OCSP and CRL responses. Verify LTV signatures.

Documentation | Demo

Redact Sensitive Content

Add redaction annotations and send the result for review. Apply redaction to permanently remove sensitive content, text, and graphics and ensure that redacted data cannot be recovered.

Documentation | Demo

  • C#
using DevExpress.Pdf;
using DevExpress.Office.DigitalSignatures;

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var pdfSigner = new PdfDocumentSigner(inputStream);

// Specify the name and location of the signature field
var signatureFieldInfo = new PdfSignatureFieldInfo(1);
signatureFieldInfo.Name = "SignatureField";
signatureFieldInfo.SignatureBounds = new PdfRectangle(20, 20, 150, 70);

// Create a PKCS#7 signature and apply it to the signature field
using var certificate = new MemoryStream(File.ReadAllBytes("Certificate.pfx"));
Pkcs7Signer pkcs7Signature = new Pkcs7Signer(certificate, "password",
    HashAlgorithmType.SHA256);
var signature = new PdfSignatureBuilder(pkcs7Signature, signatureFieldInfo);

// Specify signer information
using var imageData = new MemoryStream(File.ReadAllBytes("Signature.png"));
signature.SetImageData(imageData);
signature.Location = "USA";
signature.Name = "Jane Doe";
signature.Reason = "Acknowledgement";

// Sign and save the document
PdfSignatureBuilder[] signatures = { signature };
using var signedStream = new MemoryStream();
pdfSigner.SaveDocument(signedStream, signatures);
Copy

Printing and Export Capabilities

Use our .NET PDF Document API to send a document to printer and customize print output. Convert PDF files
to a PNG, JPEG, BMP, TIFF, GIF, or SVG format while preserving image quality. Whether you deploy apps
to Windows, macOS, or Unix-based platforms, our cross-platform printing and image export
capabilities ensure consistent results across all environments.

Convert Pages to Bitmaps/Images

Export individual pages or entire documents as images (PNG, JPEG, TIFF, BMP, EMF) for thumbnails, previews, or further processing.

Documentation | Demo

Export PDF to SVG

Convert PDF pages to scalable and resolution-independent SVG output – ideal for web display or vector-based workflows.

Documentation | Demo

Print Documents

Print PDF documents programmatically on Windows, Linux, and macOS. Send files to printers or print queues with full control over layout and relevant page settings.

Documentation

  • C#
using DevExpress.Pdf;
using DevExpress.Drawing;

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var processor = new PdfDocumentProcessor();
processor.LoadDocument(inputStream);

// Export the first page to PNG
using var pngStream = new MemoryStream();
var renderParams = PdfPageRenderingParameters.CreateWithResolution(300);
DXBitmap bitmap = processor.CreateDXBitmap(1, renderParams);
bitmap.Save(pngStream, DXImageFormat.Png);

// Export the first page to SVG
using var svgStream = new MemoryStream();
DXSvgImage svgImage = processor.CreateSvgImage(1, 1000);
svgImage.Save(svgStream, DXImageFormat.Svg);

// Print the document
PdfPrinterSettings printerSettings = new PdfPrinterSettings();
printerSettings.ScaleMode = PdfPrintScaleMode.Fit;
printerSettings.DXSettings.PrinterName = "Your Printer Name";
processor.Print(printerSettings);
Copy

Annotate & Comment

Add and edit PDF document annotations and comments. Whether you need to highlight text, insert notes,
add stamps, attach files, or redact sensitive information, the PDF Document API offers you full control
over annotations and document reviews.

Annotation Management – Add, Edit, Flatten

Add new annotations programmatically, edit their properties (position, style, content), delete annotations, or flatten them (make them a permanent part of the page).

Documentation

Implement Review Chains

Append comments or nested replies to existing annotations. Support review workflows and threaded feedback – all stored in the document.

Documentation

Highlight Text with Markups

Add highlights, underlines, or strikeouts to mark important text for reviews, proofreading, or audits.

Documentation

Comment PDFs with Sticky Notes & Free-Text

Insert sticky notes, text boxes, callouts, and typewriter style annotations to add comments or remarks at arbitrary positions.

Documentation

Add Stamps

Apply predefined or custom rubber stamps such as Approved, Draft, or Confidential directly onto your PDF pages. Easily annotate documents for review and workflow management.

Documentation

Supported Annotation Types

Link

Text Markup

Stiky Note

Caret

Rubber Stamp

Shapes

File Attachment

Free Text

Ink

Path

Redaction

Interactive Forms

Our comprehensive PDF File API allows you to create, populate, flatten, and delete fillable PDF forms.
Manage form field types programmatically, change form field appearance,
and import or export form data.

Create Forms from Scratch

Generate a fillable interactive form (AcroForm) programmatically with ease.

Documentation

Read and Fill Forms

Read existing AcroForm data or populate field values at runtime using strongly typed API calls.

Documentation

Modify Field Appearance

Customize form field properties, style, and visual formatting directly in code.

Documentation

Delete and Flatten Forms

Remove or flatten individual form fields or entire forms to lock content and ensure the final document is non-editable.

Documentation

Import/Export Form Data

Load or save interactive form data in standard formats (FDF, XFDF, XML, and TXT) for integration with external systems and storages.

Documentation

Supported Form Field Types

Text Box

Check Box

Combo Box

Group

List Box

Radio Group

Signature

Attachments, Bookmarks, Links, Layers

Use the DevExpress PDF Document API to enhance document, navigation and interactivity. Programmatically manage
file attachments, create hierarchical bookmarks or outline trees, build interactive links, and work with layered content
to deliver highly organized and user-friendly PDFs.

Manage File Attachments

Attach external documents (PDF, XML, images, text files, and more) directly to a PDF. Add, extract, or remove attachments to build self-contained packages or hybrid documents.

Documentation

Create and Modify Bookmarks

Generate hierarchical bookmarks that reflect your document's structure. Add, rename, reorder, or delete bookmarks to enhance document navigation and user experience.

Documentation

Add and Edit Links

Insert interactive links that jump to specific pages, named destinations, or external URLs. Modify link settings and actions to guide users through complex documents.

Documentation

Define and Control Named Destinations

Create named destinations that serve as navigation targets for links, bookmarks, or external references.

Documentation

Work with Optional Content Groups

Customize optional content groups’ visibility and prepare layered content for image export or printing.

Documentation

  • C#
using DevExpress.Pdf;

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var processor = new PdfDocumentProcessor();
processor.LoadDocument(inputStream);

// Attach a file to the document
processor.AttachFile(new PdfFileAttachment()
{
    CreationDate = DateTime.Now,
    Description = "Supporting data spreadsheet",
    FileName = "data.xml",
    Data = File.ReadAllBytes("data.xml"),
    MimeType = "text/xml",
    Relationship = PdfAssociatedFileRelationship.Supplement
});

// Create bookmarks with destinations
PdfDestination dest1 = processor.CreateDestination(1, 0, 700);
PdfDestination dest2 = processor.CreateDestination(1, 0, 400);
processor.Document.Bookmarks.Add(new PdfBookmark()
{ Title = "Introduction", Destination = dest1 });
processor.Document.Bookmarks.Add(new PdfBookmark()
{ Title = "Summary", Destination = dest2 });

using var outputStream = new MemoryStream();
processor.SaveDocument(outputStream);
Copy

PDF Compliance & Optimization

Ensure your PDF documents meet industry standards, interoperability requirements, and long-term
archival needs. The DevExpress PDF Document API allows you to optimize PDF files, convert them to PDF/A
compliant formats, and enrich documents with standardized metadata. Whether you're preparing invoices,
reports, or archival documents, our API helps you deliver standards-aligned PDF output.

Convert PDF to PDF/A

Convert your PDFs to PDF/A-compliant documents (1b, 2b, 3b) for long-term archiving, regulatory requirement compliance, and preservation workflows.

Documentation | Demo

Optimize/Compress PDFs

Reduce PDF size by compressing object streams and document images, and cleaning redundant data (metadata, attachments, actions, etc.). Prepare documents for efficient storage and distribution.

Documentation

ZUGFeRD Invoice

Enable seamless exchange of electronic invoices between systems by embedding structured invoice data (XML) into PDF files using the ZUGFeRD v2.3.2 standard.

Documentation

XMP Metadata

Read, remove, modify, or create XMP metadata packages to enrich documents with standardized information used for indexing, discovery, and long-term record management.

Documentation

  • C#
using DevExpress.Pdf;

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var processor = new PdfDocumentProcessor();
processor.LoadDocument(inputStream);

// Remove optional content and compress images
var options = new PdfOptimizationOptions()
{
    RemoveMetadata = true,
    RemoveThumbnails = true,
    RemoveAttachments = true,
    RemoveJavaScriptActions = true,
    ImageCompressionOptions = new PdfImageCompressionOptions()
    {
        CompressionType = PdfImageCompressionType.Jpeg,
        JpegQuality = 75,
        DownsamplingResolution = 150,
        ConvertGrayscale = true,
        GrayscaleCompressionType = PdfGrayscaleImageCompressionType.Jpeg
    }
};
processor.OptimizeDocument(options);

// Save PDF with object stream compression
using var optimizedStream = new MemoryStream();
processor.SaveDocument(optimizedStream, new PdfSaveOptions() { UseObjectStreams = true });
Copy

Search and Extract Content

The DevExpress PDF Document API allows you to quickly locate and extract information from PDF files.
Build intelligent applications that search, extract, and analyze text, modify matched content,
retrieve images, and obtain content coordinates.

Extract Text

Easily extract text from a specified document region, a single page, or the entire PDF document.

Documentation

Extract Images

Retrieve embedded document images and export them to various image formats (BMP, JPEG, PNG, TIFF and others) for downstream processing, analysis, or reuse.

Documentation

Search Text

Find words and phrases anywhere in a PDF to annotate, highlight, bookmark, or sanitize matched content.

Documentation

Obtain Content Coordinates

Retrieve text and image positions, bounding boxes, and context to power advanced indexing and search workflows.

Documentation

  • C#
using DevExpress.Pdf;

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var pdfProcessor = new PdfDocumentProcessor();
pdfProcessor.LoadDocument(inputStream);

// Search for specific text and redact it
string findText = "myemail@company.com";
PdfDocumentFacade documentFacade = pdfProcessor.DocumentFacade;
PdfTextSearchParameters searchParams = new PdfTextSearchParameters()
{
    CaseSensitive = true,
    WholeWords = true
};
PdfTextSearchResults results = pdfProcessor.FindText(findText, searchParams);
while (results.Status == PdfTextSearchStatus.Found)
{
    int pageIndex = results.Page.GetPageIndex();
    PdfPageFacade facadePage = documentFacade.Pages[pageIndex];
    var redactAnnotation = facadePage.AddRedactAnnotation(results.Rectangles);
    redactAnnotation.FillColor = new PdfRGBColor(0, 0, 0);

    results = pdfProcessor.FindText(findText, searchParams);
}

// Apply redactions to permanently remove content and save the document
documentFacade.ApplyRedactAnnotations();
using var redactedStream = new MemoryStream();
pdfProcessor.SaveDocument(redactedStream);
Copy

AI-ready PDF Processing APIs

DevExpress PDF Document API offers backend-ready AI-powered extensions to summarize, translate, and chat
with content using any AI model. Our AI extensions integrate seamlessly with both cloud-based services
(Azure OpenAI, OpenAI, Google Gemini) and offline models (Ollama, ONNX Runtime, AI Foundry Local)
via the Microsoft.Extensions.AI library and its IChatClient interface.

Integrate AI Provider of Your Choice

Choose and integrate the AI service provider that fits your security, cost, and performance requirements.

Documentation

Summarize Documents

Generate executive summaries from lengthy reports and contracts — perfect for document management systems, legal tech, and business intelligence dashboards.

Documentation

Translate Text

Translate PDF text into any supported language and integrate translation output into your own workflows or UI.

Documentation

Chat with Document Data

Build searchable knowledge bases from your PDFs and let users ask questions in plain language — perfect for customer support portals, HR systems, and internal documentation. Automatically chunk large documents for efficient AI processing to reduce token costs and improve response times for production workloads.

Documentation

  • C#
using DevExpress.Pdf;
using DevExpress.AIIntegration;
using DevExpress.AIIntegration.Docs;
using Microsoft.Extensions.AI;
using Azure.AI.OpenAI;
using System.Globalization;

// Register AI provider (Azure OpenAI)
string endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
string apiKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY");
string model = "gpt-4o-mini";

IChatClient client = new AzureOpenAIClient(
    new Uri(endpoint), new System.ClientModel.ApiKeyCredential(apiKey))
    .GetChatClient(model).AsIChatClient();
AIExtensionsContainerDefault aiContainer =
    AIExtensionsContainerConsole.CreateDefaultAIExtensionContainer(client);
var aiService = aiContainer.CreateAIDocProcessingService();

using var inputStream = new MemoryStream(File.ReadAllBytes("Document.pdf"));
using var processor = new PdfDocumentProcessor();
processor.LoadDocument(inputStream);

// Summarize the document
string summary = await aiService.SummarizeAsync(
    processor, SummarizationMode.Extractive, CancellationToken.None);

// Translate the first page to Spanish
var cropBox = processor.Document.Pages[0].CropBox;
var pageArea = new PdfDocumentArea(1, cropBox);
string translation = await aiService.TranslateAsync(
    processor, pageArea, new CultureInfo("es-ES"));

// Ask a question about the document
string answer = await aiService.AskAIAsync(
    processor, "What is this document about?");
Copy

FAQ — PDF Document API

 
Is Adobe Acrobat® required to create PDFs with the DevExpress PDF Document API?

No. You do not need to install Adobe Acrobat® or Adobe Reader® to generate or manipulate PDF files. DevExpress PDF Document API is a standalone library that creates and processes PDF documents programmatically.

Does the PDF Document API support .NET?

Yes. DevExpress PDF Document API supports .NET 10, .NET 9, and .NET 8. Our PDF file generation API works in apps that run on Windows, Linux, and macOS. You can deploy your apps on Azure and AWS.

What .NET Framework versions does the PDF Document API support?

DevExpress PDF Document API supports .NET Framework 4.6.2, 4.7, and 4.8 (current version v25.2). For complete version compatibility information, refer to our prerequisites documentation: Office File API Prerequisites.

How is the PDF Document API licensed?

DevExpress PDF Document API is licensed per developer. Each developer using the API requires an individual license. Licensing is not based on the number of machines, deployments, CPUs, or end users.

The PDF Document API is available through two licensing options:

For complete licensing terms, refer to the DevExpress End-User License Agreement.

Which NuGet package do I need for the PDF Document API?

Install the DevExpress.Document.Processor NuGet package or for .NET Framework projects using the DevExpress Unified Component Installer, reference the following v25.2+ assemblies:

  • DevExpress.Data.dll
  • DevExpress.Docs.dll
  • DevExpress.Drawing.dll
  • DevExpress.Office.Core.dll
  • DevExpress.Pdf.Core.dll
  • DevExpress.Pdf.Drawing.dll
What can I do with the PDF Document API?

DevExpress PDF Document API allows you to create, load, modify, save, and manipulate PDF documents programmatically. You can generate PDFs from scratch with text, graphics, and images, merge and split PDF files, add watermarks and annotations, create and fill interactive forms (AcroForms), digitally sign documents, encrypt and protect PDFs, extract text and images, work with attachments, create PDF/A compliant documents, add bookmarks and hyperlinks, print PDFs, export PDF pages to images, and create ZUGFeRD-compliant invoices.

Does the PDF Document API include AI-powered features?

Yes. The DevExpress PDF Document API includes AI-powered extensions for document processing. These extensions support translation of entire PDF documents or specific pages/regions, summarization of PDF content, and contextual question answering using RAG (retrieval-augmented generation).

To use AI extensions, install the DevExpress.AIIntegration.Docs NuGet package.

Refer to our documentation for implementation details: AI-powered Extensions for DevExpress Office File API.

How do I load a PDF document and print it?
  • C#
using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
    processor.LoadDocument("document.pdf");
    PdfPrinterSettings settings = new PdfPrinterSettings();
    settings.PageNumbers = new int[] { 1, 2, 3 };
    processor.Print(settings);
}
Copy
How do I create a simple AcroForm?
  • C#
using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
    processor.CreateEmptyDocument();
    PdfDocumentFacade facade = processor.DocumentFacade;
    PdfAcroFormFacade form = facade.AcroForm;
    var nameField = form.AddTextFormField(1, "Name",
        new PdfRectangle(50, 700, 200, 720));
    processor.SaveDocument("form.pdf");
}
Copy
How do I create a ZUGFeRD-compliant invoice?

Simple approach:

  • C#
using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
    processor.LoadDocument("invoice.pdf");
    processor.Document.AttachZugferdInvoice(
        File.ReadAllBytes("zugferd-invoice.xml"));
    processor.SaveDocument("invoice-zugferd.pdf");
}
Copy

With version and conformance level (XMP metadata approach):

  • C#
using DevExpress.Pdf;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {
    processor.LoadDocument("invoice.pdf");
    processor.Document.AttachZugferdInvoice(
        File.ReadAllBytes("zugferd-invoice.xml"),
        PdfZugferdVersion.Version232,
        PdfZugferdConformanceLevel.EN16931);
    processor.SaveDocument("invoice-zugferd.pdf");
}
Copy

Note: The AttachZugferdInvoice method does not convert the document to a PDF/A-3b compatible file. Make certain your document is PDF/A-3b compliant before attaching ZUGFeRD XML.

How do I get started with the PDF Document API?