# OfficeIMO.Pdf

Create, inspect, edit, merge, split, stamp, sign, validate, and render PDF files with a first-party .NET engine. Compare packages, examples, and limits.

PDF engine

Create, inspect, edit, merge, split, stamp, sign, validate, and render PDF files with a first-party .NET engine. Compare packages, examples, and limits.

MIT licensed No Office required Cross-platform .NET

[Start with the guide](/docs/pdf/) [Browse API](/api/pdf/) [View package](https://www.nuget.org/packages/OfficeIMO.Pdf)

Install `dotnet add package OfficeIMO.Pdf` 

[!\[Independent render of the generated quarterly operations dashboard: four KPI panels, a labelled monthly bar chart with a target line, a service-line table, a summary and a decisions table\](/downloads/showcase/pdf/showcase-dashboard-page1.webp)](/downloads/showcase/pdf/showcase-dashboard-page1.png) 

**Executive PDF dashboard**

The PDF is generated by one runnable example and the page image is an independent Poppler render of that same file.

[Download PDF](/downloads/showcase/pdf/showcase-dashboard.pdf) · [View source](/downloads/showcase/source/Pdf/Pdf.ShowcaseDashboard.cs.txt) · [Explore the example](/showcase/#executive-pdf-dashboard)

C# · excerpt cut from the example source; the full file is linked above

```csharp
document.Page(page => {
    page.Size(PdfPageSizes.A4).Landscape().Margin(global::OfficeIMO.OfficeLength.Points(42), global::OfficeIMO.OfficeLength.Points(38), global::OfficeIMO.OfficeLength.Points(42), global::OfficeIMO.OfficeLength.Points(42));
    page.DefaultParagraphStyle(new PdfParagraphStyle { LineHeight = 1.18, SpacingAfter = global::OfficeIMO.OfficeLength.Points(5) });
    page.Content(content => {
        content.Item(item => item.H1("Quarterly operations dashboard", OfficeAlignment.Left));
        content.Item(item => item.AddParagraph(p => p.AddText("Service levels, resolved volume and the decisions needed for Q4."), style: new PdfParagraphStyle { SpacingAfter = OfficeLength.Points(10) }));

        // Four KPI panels share the row width.
        content.Row(row => {
            row.Gap(global::OfficeIMO.OfficeLength.Points(14))
                .PercentColumn(25, column => column.AddPanelParagraph(p => { p.AddText("94.2%").SetBold().SetFontSize(global::OfficeIMO.OfficeLength.Points(22)); p.AddText("\nSLA attainment (target 92%)").SetFontSize(global::OfficeIMO.OfficeLength.Points(9.5)); }, MetricPanel(global::OfficeIMO.OfficeColor.FromRgb(236, 253, 245), global::OfficeIMO.OfficeColor.FromRgb(22, 163, 74)), OfficeAlignment.Left, global::OfficeIMO.OfficeColor.FromRgb(22, 101, 52)))
                .PercentColumn(25, column => column.AddPanelParagraph(p => { p.AddText("1.8 h").SetBold().SetFontSize(global::OfficeIMO.OfficeLength.Points(22)); p.AddText("\nMean first response").SetFontSize(global::OfficeIMO.OfficeLength.Points(9.5)); }, MetricPanel(global::OfficeIMO.OfficeColor.FromRgb(239, 246, 255), global::OfficeIMO.OfficeColor.FromRgb(37, 99, 235)), OfficeAlignment.Left, global::OfficeIMO.OfficeColor.FromRgb(30, 64, 175)))
                .PercentColumn(25, column => column.AddPanelParagraph(p => { p.AddText("37").SetBold().SetFontSize(global::OfficeIMO.OfficeLength.Points(22)); p.AddText("\nOpen escalations").SetFontSize(global::OfficeIMO.OfficeLength.Points(9.5)); }, MetricPanel(global::OfficeIMO.OfficeColor.FromRgb(255, 251, 235), global::OfficeIMO.OfficeColor.FromRgb(217, 119, 6)), OfficeAlignment.Left, global::OfficeIMO.OfficeColor.FromRgb(146, 64, 14)))
                .PercentColumn(25, column => column.AddPanelParagraph(p => { p.AddText("0").SetBold().SetFontSize(global::OfficeIMO.OfficeLength.Points(22)); p.AddText("\nCritical blockers").SetFontSize(global::OfficeIMO.OfficeLength.Points(9.5)); }, MetricPanel(global::OfficeIMO.OfficeColor.FromRgb(248, 250, 252), global::OfficeIMO.OfficeColor.FromRgb(100, 116, 139)), OfficeAlignment.Left, global::OfficeIMO.OfficeColor.FromRgb(51, 65, 85)));
        });

        content.Spacer(global::OfficeIMO.OfficeLength.Points(12));

        // Chart and table on the left, narrative and decisions on the right.
        content.Row(row => {
            row.Gap(global::OfficeIMO.OfficeLength.Points(18))
                .PercentColumn(58, column => {
                    column.AddParagraph(p => p.AddText("Tickets resolved per month").SetBold(), style: SectionLabel());
                    column.Drawing(CreateTrendDrawing(), OfficeAlignment.Left, spacingBefore: global::OfficeIMO.OfficeLength.Points(2), spacingAfter: global::OfficeIMO.OfficeLength.Points(8));
                    column.AddTable(CreateServiceRows(), style: ServiceTableStyle());
                })
                .PercentColumn(42, column => {
                    column.AddParagraph(p => p.AddText("Summary").SetBold(), style: SectionLabel());
                    column.AddPanelParagraph(
                        p => p.AddText("SLA attainment finished above the 92% target in all three months while resolved volume grew 15%. Integrations is the only service line below target, and its response time is the main driver."),
                        new PdfPanelStyle {
                            Background = global::OfficeIMO.OfficeColor.FromRgb(248, 250, 252),
                            BorderColor = global::OfficeIMO.OfficeColor.FromRgb(203, 213, 225),
                            BorderWidth = global::OfficeIMO.OfficeLength.Points(0.7),
                            PaddingX = global::OfficeIMO.OfficeLength.Points(10),
                            PaddingY = global::OfficeIMO.OfficeLength.Points(8)
                        });
                    column.AddList(new[] {
                        "Resolved tickets: 2,617, up from 2,274 last quarter.",
                        "Security and Billing answer in about an hour.",
                        "Integrations answers in 3.1 h against a 2 h goal.",
                        "No critical blockers are open at quarter end."
                    }, style: new PdfListStyle { SpacingAfter = global::OfficeIMO.OfficeLength.Points(4), ItemSpacing = global::OfficeIMO.OfficeLength.Points(2) });
                    column.AddTable(CreateDecisionRows(), style: DecisionTableStyle());
                });
        });
    });
});
```

## One PDF model from creation to validation

Use `OfficeIMO.Pdf` when a workflow must own the PDF rather than hand it to a desktop application. The package covers authoring, inspection, page operations, forms, attachments, annotations, rendering, signatures, and validation through the same first-party model.

```csharp
using OfficeIMO.Pdf;

PdfDocument.Create(pdf => pdf.Content(content => content
        .H1("Quarterly report")
        .AddParagraph(paragraph => paragraph.AddText("Generated without Office or a browser runtime."))))
    .Meta(title: "Quarterly report", author: "OfficeIMO")
    .Save("report.pdf");
```

## Choose the workflow you need

| Workflow | Use it for |
| --- | --- |
| Build | Reports, invoices, forms, labels, portfolios, and page-aware components |
| Inspect | Text, pages, links, images, attachments, outlines, forms, revisions, and active-content diagnostics |
| Transform | Merge, split, extract, reorder, rotate, stamp, watermark, overlay, and metadata changes |
| Archive | Convert existing PDFs to PDF/A-2, 3 or 4, with every change listed, or every reason a file can't be converted |
| Secure | CMS-backed signatures, timestamps, certificate validation, and revision-aware inspection through `OfficeIMO.Security` |
| Render | Page images and format adapters used by Word, Excel, PowerPoint, HTML, RTF, and OpenDocument packages |
| Print | Installed Windows, macOS, and Linux printers with page ranges, 1, 2, 4, 6, or 9 pages per sheet, scaling, duplex, and paper source, through `OfficeIMO.Workflows` or `officeimo workflow print`. The .NET workflow can also preview the exact rendered sheets before sending them |

Complex source formats do not map perfectly to PDF in every case. Conversion results expose diagnostics so applications can decide whether an approximation is acceptable.

## Try real PDF workflows in the browser

The [browser document workspace](/browser/inspect-pdf/) runs a focused set of `OfficeIMO.Pdf` operations through WebAssembly. Files stay in the current tab, and every successful operation produces a downloadable artifact plus a JSON report with input and output fingerprints.

| Browser task | Result |
| --- | --- |
| [Inspect](/pdf/inspect/) | Page, encryption, form, annotation, attachment, active-content, signature-marker, and rewrite-readiness evidence |
| Organize | [Merge PDFs](/pdf/merge/), [split PDFs](/pdf/split/), [extract PDF pages](/pdf/extract-pages/), [delete PDF pages](/pdf/delete-pages/), [reorder PDF pages](/pdf/reorder-pages/), and [rotate PDF pages](/pdf/rotate-pages/) without changing the selected source files |
| [Optimize](/pdf/optimize/) | Deterministic lossless optimization and Fast Web View profiles without rasterizing pages |
| Protect or unlock | [AES-256 Standard password protection](/pdf/protect/), or a [separate unprotected copy](/pdf/unlock/) |
| [Redact](/pdf/redact/) | Literal text removal followed by checks of extracted text, encoded strings, and decoded streams |
| [Compare](/pdf/compare/) | A self-contained visual gallery with expected, actual, and highlighted page differences |

[Browse every PDF workflow](/pdf/), [open PDF tools](/browser/inspect-pdf/), or download the [showcase PDF](/downloads/showcase/pdf/showcase-dashboard.pdf) used by the built-in samples.

## Convert PDF content into editable formats

The workspace also exposes [PDF to DOCX](/convert/pdf-to-word/), [detected PDF tables to XLSX](/convert/pdf-tables-to-excel/), [PDF to PPTX](/convert/pdf-to-powerpoint/), and [PDF to HTML](/convert/pdf-to-html/). These are logical imports, not a promise that every fixed-position page can become the original editable source. Word reconstructs semantic content, Excel imports detected tables, and HTML supports semantic and positioned-review profiles; the browser selects positioned review so page geometry remains inspectable. PowerPoint defaults to native text boxes, detected tables, safe basic shapes, and separate supported images, with explicit visual-page, hybrid, and tables-only alternatives. Each download includes diagnostics that identify reconstructed, substituted, visual-only, truncated, or omitted content.

For application code, use the focused adapter that owns the target:

```csharp
using OfficeIMO.Pdf;
using OfficeIMO.Pdf.Word;

PdfDocument pdf = PdfDocument.Load(File.ReadAllBytes("report.pdf"));
OfficeConversionReport result = pdf.SaveAsWord("report.docx");

foreach (OfficeDiagnostic diagnostic in result.Diagnostics) {
    Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");
}
```

## Important boundaries

- Browser files are limited to 25 MiB each, ten PDFs and 75 MiB combined for multi-file tools, 500 parsed pages, 100 split outputs, and 25 pages per visual comparison. Generated artifacts are capped at 96 MiB, with a 64 MiB serialized-PDF ceiling for split archives.
- Optimization is deliberately lossless. Scan-oriented image downsampling and other lossy compression need a separate policy and evidence contract.
- OCR and searchable-PDF generation use `OfficeIMO.Pdf.Ocr` with an explicitly configured OCR provider. They are separate .NET workflows and are not included in these browser PDF tools. See the [PDF OCR API](/api/pdf-ocr/).
- Password protection is not a digital signature. CMS-backed signing, timestamping, trust validation, and revision inspection remain .NET workflows through `OfficeIMO.Pdf` and `OfficeIMO.Security`.
- Filling a visual signature field is also different from applying a cryptographic signature. Applications should present those actions separately.
- Printing is a .NET and command-line workflow. The browser tools leave printing to the browser. A returned job identifier confirms that the queue accepted the job, not that paper came out.

Same engine, other surfaces

## Use OfficeIMO another way

[**Studio** Edit supported PDF text, comments, forms and pages in one desktop window. *Explore Studio →*](/studio/) [**Browser** Convert and organize files in your tab. Files never leave your device. *Open a tool →*](/convert/) [**CLI** The same conversions in scripts, CI jobs and AI agents over MCP. *Install the CLI →*](/cli/) [**AI agents** An MCP server, plugin and skills for Claude, Codex, Copilot and Cursor. *Add to your agent →*](/agents/) [**PowerShell** PSWriteOffice brings 540 commands to PowerShell 5.1 and 7. *Start with PowerShell →*](/powershell/)

Next step

## Turn the package into a working document.

Follow a focused guide and inspect the API reference for this package.

[Open the guide](/docs/pdf/)[Open PDF tools](/browser/inspect-pdf/)

<!-- PowerForge markdown artifact sha256:C13C151D5E1320A510E112937CE119B3D09FC0E43B9FB408E53E8CEACB2C4A99 -->
