$npx -y skills add DevExpress/agent-skills --skill devexpress-office-file-api-pdfBuild .NET applications with the DevExpress PDF Document API for creating, reading, editing, merging, signing, and extracting content from PDF files programmatically. Use when working with PDF documents, PDF generation, PDF graphics API, interactive PDF forms, digital signatures,
| 1 | # DevExpress PDF Document API |
| 2 | |
| 3 | The PDF Document API is a non-visual .NET library for creating, loading, editing, merging, splitting, signing, and extracting content from PDF documents — without requiring Adobe Acrobat. It supports both new document generation via a graphics API and processing of existing PDFs through `PdfDocumentProcessor`. Features include interactive AcroForm fields, digital signatures (PKCS#7, PAdES), password protection, annotations, bookmarks, hyperlinks, content extraction, and XMP metadata management. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill when you need to: |
| 8 | |
| 9 | - Create new PDF files from scratch using a graphics drawing API |
| 10 | - Load and modify existing PDF files (rotate pages, add content, change properties) |
| 11 | - Merge multiple PDF files into one or split pages out of a document |
| 12 | - Add or reorder pages, copy pages between documents |
| 13 | - Draw text, images, rectangles, lines, ellipses, and paths on PDF pages |
| 14 | - Create interactive AcroForms (text boxes, check boxes, combo boxes, radio groups, signature fields) |
| 15 | - Read and write AcroForm field values, or flatten forms |
| 16 | - Apply digital signatures (PKCS#7, PAdES) using PFX files or custom signers (Azure Key Vault) |
| 17 | - Validate existing digital signatures in PDFs |
| 18 | - Protect PDFs with user/owner passwords and restrict permissions (printing, editing, copying) |
| 19 | - Add annotations (highlight, underline, sticky notes, redaction) to pages |
| 20 | - Add bookmarks, hyperlinks, and file attachments |
| 21 | - Extract text (with word coordinates), search text, or extract images from PDF pages |
| 22 | - Convert PDFs to PDF/A-1b, PDF/A-2b, PDF/A-3b compliance |
| 23 | - Read and write XMP metadata packets |
| 24 | - Print PDFs with custom printer settings |
| 25 | |
| 26 | ## Prerequisites & Installation |
| 27 | |
| 28 | ### NuGet Packages |
| 29 | |
| 30 | | Package | Purpose | |
| 31 | |---------|---------| |
| 32 | | `DevExpress.Document.Processor` | Core PDF processing: create, load, edit, merge, sign, extract | |
| 33 | | `DevExpress.Pdf.SkiaRenderer` | Cross-platform rendering and image export (.NET 8+) | |
| 34 | |
| 35 | ### .NET (8/9/10+) |
| 36 | |
| 37 | ```bash |
| 38 | dotnet add package DevExpress.Document.Processor |
| 39 | dotnet add package DevExpress.Pdf.SkiaRenderer # For rendering/export on .NET 8+ |
| 40 | ``` |
| 41 | |
| 42 | ### .NET Framework (4.6.2+) |
| 43 | |
| 44 | ``` |
| 45 | Install-Package DevExpress.Document.Processor |
| 46 | ``` |
| 47 | |
| 48 | On .NET Framework, GDI+ is used for rendering — `DevExpress.Pdf.SkiaRenderer` is not required. See [references/getting-started-dotnet-fw.md](references/getting-started-dotnet-fw.md) for assembly references. |
| 49 | |
| 50 | **Important**: All DevExpress packages in a project must share the same version number. A valid DevExpress license is required. |
| 51 | |
| 52 | ### Non-Windows Development (Linux, macOS, Docker, Cloud) |
| 53 | |
| 54 | The library uses a platform-specific drawing engine: GDI+ on Windows, SkiaSharp elsewhere. The SkiaSharp-based engine (via `DevExpress.Pdf.SkiaRenderer` and `DevExpress.Drawing.Skia`) 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). |
| 55 | |
| 56 | See [references/getting-started.md](references/getting-started.md#non-windows-platform-support-linux-macos-docker-cloud) for the full non-Windows setup and troubleshooting guide. |
| 57 | |
| 58 | ## Before You Start — Ask the Developer |
| 59 | |
| 60 | 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. |
| 61 | |
| 62 | Before generating code, ask these questions to avoid rework: |
| 63 | |
| 64 | ### General Questions |
| 65 | 1. **Target framework**: Are you using .NET 8+ or .NET Framework 4.x? |
| 66 | 2. **New or existing project?**: Creating new or adding to existing? |
| 67 | 3. **Hosting model**: Console app, ASP.NET Core, Blazor, MAUI, WinForms, WPF, or something else? |
| 68 | |
| 69 | ### PDF-Specific Questions |
| 70 | 4. **Operation type**: Generate new PDF from scratch / read-extract from existing / merge-split / sign / protect / add interactive forms / add annotations? |
| 71 | 5. **Starting point**: Create from scratch with graphics API / convert from another format / process an existing PDF? |
| 72 | 6. **Out |