devexpress/agent-skills/devexpress-office-file-api-pdf-new

Claude Code and agent skill by devexpress/agent-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Create, load, modify, secure, and print PDF documents using the new DevExpress.Docs.Pdf API — a modern object-oriented DOM approach for .NET. Use for any PDF task in a project that references the DevExpress.Docs.Pdf package, or when the developer asks for the new DevExpress PDF API (CTP): merge or combine PDF files, split, reorder, rotate, or remove pages, generate a PDF with text, images, and shapes, fill a PDF form and lock its fields, find and redact text, password-protect or encrypt a PDF, add a watermark or stamp, add annotations or links, attach a ZUGFeRD/Factur-X invoice. Also use when someone mentions "DevExpress.Docs.Pdf", "new PDF API", "PdfDocument class", "pdf fragment", "pdf form fields", "pdf redaction", "tagged pdf", "pdf/ua", "pdf encryption", or asks to migrate from PdfDocumentProcessor to the new API. For projects that use PdfDocumentProcessor (DevExpress.Pdf) and are not migrating, use the devexpress-office-file-api-pdf skill instead. Covers both .NET and .NET Framework.

Install

npx vskill@latest install devexpress/agent-skills/devexpress-office-file-api-pdf-new

SKILL.md

DevExpress New PDF Document API (CTP)

[!IMPORTANT] Community Technology Preview (CTP)
The DevExpress.Docs.Pdf library is currently available as a CTP. Do not use it in mission-critical production applications. Try the library, share feedback, and await the official release. The legacy DevExpress.Pdf (PdfDocumentProcessor) API remains fully supported.

The new DevExpress PDF Document API (DevExpress.Docs.Pdf) is a cross-platform .NET library with a strongly-typed, object-oriented document model. It lets you create, load, modify, save, print, encrypt, and structurally tag PDF documents. The entry point is PdfDocument, which exposes pages, fragments, annotations, form fields, metadata, structure tree, and attachments as first-class typed collections. Works on Windows, Linux, and macOS.

When to Use This Skill

  • Create new PDF documents with text, images, shapes, and reusable templates
  • Load and modify existing PDF files (edit content, add/remove pages, manage annotations)
  • Manage interactive forms: create, fill, make read-only, import/export AcroForm data
  • Find, format, redact, or permanently remove text from PDF documents
  • Encrypt PDF documents and set granular permissions (print, modify, extract)
  • Build tagged/accessible PDFs (PDF/UA) using the structure tree API
  • Merge PDF documents or reorganize pages (clone, reorder, rotate, resize)
  • Embed file attachments or ZUGFeRD/Factur-X electronic invoice XML
  • Print PDFs cross-platform (Windows, Linux/macOS via CUPS)
  • Migrate existing code from PdfDocumentProcessor to the new PdfDocument API

Prerequisites & Installation

CTP Warning: This package is a pre-release. Pin to the exact v26.1 version to avoid unexpected changes.
NuGet Packages
PackagePurpose
DevExpress.Docs.PdfNew PDF Document API (CTP)
.NET (8/9/10+)
bash
dotnet add package DevExpress.Docs.Pdf
.NET Framework (4.7.2+)
Install-Package DevExpress.Docs.Pdf

Or add DLL references: DevExpress.Docs.Pdf.v26.1.dll, DevExpress.Data.v26.1.dll, DevExpress.Drawing.v26.1.dll, DevExpress.Printing.v26.1.Core.dll, DevExpress.Office.v26.1.Core.dll, DevExpress.Docs.Core.v26.1.dll.

Important: All DevExpress packages in a project must share the same version. A valid DevExpress license is required.

Non-Windows Platform Support (Linux, macOS, Docker, Cloud)

Despite the new object model, DevExpress.Docs.Pdf is built on the same DevExpress.Drawing library as the legacy PdfDocumentProcessor API (note DevExpress.Drawing.v26.1.dll in the .NET Framework assembly list above) — it still uses a platform-specific drawing engine: GDI+ on Windows, SkiaSharp elsewhere. The SkiaSharp-based engine is enabled automatically on non-Windows platforms. Enable Settings.DrawingEngine at app startup only to force Skia on Windows (e.g., to work around the 10K GDI-handle limit). Add the Skia-based drawing engine package for Linux/macOS/Docker/Cloud:

bash
dotnet add package DevExpress.Drawing.Skia

Redaction (ApplyRedaction) on non-Windows platforms also requires the Skia-based PDF renderer package:

bash
dotnet add package DevExpress.Pdf.SkiaRenderer

On Linux, also install the font libraries: sudo apt-get install -y libc6 libicu-dev libfontconfig1 (Debian/Ubuntu) or sudo yum install -y glibc-devel libicu fontconfig (RHEL/CentOS/Fedora).

For printing on non-Windows, use PrintOptions.PrinterSettings to print through CUPS on macOS/Linux.

Before You Start — Ask the Developer

If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's AskUserQuestion tool or GitHub Copilot's askQuestions tool. If no such tool is available, ask the questions directly in the chat response before generating code.

Before generating code, confirm the following:

General
  1. Target framework: .NET 8+ or .NET Framework 4.x?
  2. New or existing project?: Creating fresh or adding to an existing codebase?
  3. Hosting model: Console, ASP.NET Core, Blazor, WinForms, WPF, background service?
  4. CTP acknowledgement: Has the developer confirmed they understand this is a pre-release library?
PDF-Specific
  1. Operation: Create new document, load and modify existing, merge, extract text, fill forms, or secure?
  2. Content types needed: Text, images, shapes, form fields, annotations, redaction, structure tree?
  3. Security requirements: Encryption, permissions, password protection?
  4. Output: Save to file, stream, or print?
Rule: If the developer's answer is ambiguous, ask before generating code. Do not guess.

Component Overview

The new PDF API provides:

  • Document Model (PdfDocument): Central object — pages, fields, metadata, structure tree, attachments, encryption
  • Page Content (Page, FragmentCollection): Add/inspect/modify text, images, shapes via typed fragment objects
  • Annotations (Page.Annotations): Typed annotation classes — FreeTextAnnotation, RedactionAnnotation, TextAnnotation, LinkAnnotation, and more
  • Interactive Forms (PdfDocument.Fields): Create and fill TextBoxField, CheckBoxField, RadioGroupField, ListBoxField, ComboBoxField, SignatureField
  • Search & Redaction (PdfDocument.FindText, ApplyRedaction): Find text, format matches, permanently redact regions
  • Structure Tree (PdfDocument.StructureTree): Build tagged PDFs for PDF/UA accessibility compliance
  • Security (PdfDocument.Encrypt): AES-128/AES-256 encryption with granular permission flags
Core Entry Point
csharp
using DevExpress.Docs.Pdf;
using DevExpress.Drawing.Printing;
using System.Drawing;
// Create new document
using var doc = new PdfDocument();
Page page = doc.Pages.Add(DXPaperKind.A4);
page.AddTextFragment("Hello", 50, 770); // text + position only
page.Fragments.Add(new TextFragment { // configured fragment
Text = "World", Location = new PointF(50, 740), FontSize = 14
});
doc.Save(new FileStream("output.pdf", FileMode.Create));
// Load existing document
using var existing = new PdfDocument(File.OpenRead("input.pdf"));
// ... modify pages, annotations, fields ...
existing.Save(new FileStream("modified.pdf", FileMode.Create));

Documentation & Navigation Guide

Getting Started

📄 references/getting-started.md

When you need to:

  • Install and configure the library for the first time
  • Create your first PDF document with text and images
  • Understand the coordinate system (bottom-left origin, points)
  • See a complete multi-page working example
Add Content to Pages

📄 references/add-content.md

When you need to:

  • Add text (single-line or multiline/wrapped) to a PDF page
  • Add images in BMP, JPEG, PNG, EMF, TIFF, SVG formats
  • Draw shapes and lines using PathFragment
  • Create reusable page templates (FormTemplate / FormFragment)
Organize Pages

📄 references/organize-pages.md

When you need to:

  • Add, insert, reorder, clone, or remove pages
  • Copy pages from one document to another
  • Rotate, resize, scale, or offset page content
  • Merge PDF documents by appending pages
Interactive Form Fields

📄 references/form-fields.md

When you need to:

  • Create text boxes, checkboxes, radio buttons, list boxes, combo boxes, or signature fields
  • Fill or read form fields, and make them read-only
  • Import/export AcroForm data (FDF, XFDF, XML, TXT)
  • Group form fields or apply value formatting
Search, Edit & Redact Text

📄 references/search-replace-redact.md

When you need to:

  • Find text in a PDF document
  • Format search results (change font, color, bold)
  • Permanently redact matched text regions
  • Remove text or clear content from rectangular areas
Security & Encryption

📄 references/security.md

When you need to:

  • Encrypt a PDF with user and owner passwords (AES-128/AES-256)
  • Set granular permissions (print, modify, extract, interact)
  • Open and inspect encrypted documents
  • Remove encryption from a document
Structure Tree (Tagged PDF / PDF/UA)

📄 references/structure-tree.md

When you need to:

  • Create accessible tagged PDFs with a logical structure tree
  • Map custom tags to standard PDF roles
  • Edit or remove elements from an existing document's structure
Metadata and Attachments

📄 references/metadata-attachments.md

When you need to:

  • Read or write standard PDF document properties (Title, Author, Subject, Keywords)
  • Work with XMP metadata schemas
  • Embed file attachments in a PDF
  • Attach a ZUGFeRD/Factur-X electronic invoice XML
Annotations

📄 references/annotations.md

When you need to:

  • Add sticky notes, text highlights, underlines, or free text annotations
  • Create watermark annotations or rubber stamps (static, dynamic, custom)
  • Add link annotations (URL, page navigation, cross-document)
  • Create drawing annotations (circle, square, line, ink)
  • Search and edit existing annotations by type or author
  • Remove annotations (and their threaded replies)
  • Add comments (AddReply) or reviews (AddReview, ReviewStatus) to annotations
  • Customize annotation appearance (border, color, cloudy effect)
Migration from Legacy API

📄 references/migration.md

When you need to:

  • Migrate from PdfDocumentProcessor / DevExpress.Pdf to PdfDocument / DevExpress.Docs.Pdf
  • Map old annotation/field/encryption types to new equivalents
  • Understand side-by-side namespace coexistence

Quick Start Example

csharp
using DevExpress.Docs.Pdf;
using DevExpress.Drawing;
using DevExpress.Drawing.Printing;
using System.Drawing;
// Create a multi-page PDF report
using (PdfDocument pdfDocument = new PdfDocument()) {
// Page 1: Title and text
Page page1 = pdfDocument.Pages.Add(DXPaperKind.A4);
page1.Fragments.Add(new TextFragment {
Text = "Quarterly Sales Report",
Location = new PointF(50, 770),
Font = new TextFont("Arial", TextFontStyle.Bold),
FontSize = 24
});
page1.Fragments.Add(new TextFragment {
Text = "This report summarizes Q1 2026 sales data.",
Location = new PointF(50, 730),
Font = new TextFont("Arial"),
FontSize = 12
});
// Add a logo image
DXImage logo = DXImage.FromStream(File.OpenRead("logo.png"));
page1.Fragments.Add(new ImageFragment(logo) {
Location = new PointF(50, 600)
});
// Page 2: Data
Page page2 = pdfDocument.Pages.Add(DXPaperKind.A4);
page2.Fragments.Add(new TextFragment {
Text = "North America: $1,250,000",
Location = new PointF(50, 730),
Font = new TextFont("Arial"),
FontSize = 12
});
// Save
using (FileStream fs = File.Create("SalesReport.pdf"))
pdfDocument.Save(fs);
}

Key Properties & API Surface

PdfDocument

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
52
Repository forks
8
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/devexpress/agent-skills/devexpress-office-file-api-pdf-new/badge)](https://verified-skill.com/skills/devexpress/agent-skills/devexpress-office-file-api-pdf-new)

Something wrong with this skill or its page? Tell us.