Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

PDF engine

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.

MIT licensed No Office required Cross-platform .NET
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
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 · View source · Explore the example
C# · excerpt cut from the example source; the full file is linked above
document.Page(page => {
    page.Size(PageSizes.A4).Landscape().Margin(42, 38, 42, 42);
    page.DefaultParagraphStyle(new PdfParagraphStyle { LineHeight = 1.18, SpacingAfter = 5 });
    page.Content(content => {
        content.Item(item => item.H1("Quarterly operations dashboard", PdfAlign.Left, PdfColor.FromRgb(15, 23, 42)));
        content.Item(item => item.Paragraph(p => p.Text("Service levels, resolved volume and the decisions needed for Q4."), style: new PdfParagraphStyle { SpacingAfter = 10 }));

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

        content.Spacer(12);

        // Chart and table on the left, narrative and decisions on the right.
        content.Row(row => {
            row.Gap(18)
                .PercentColumn(58, column => {
                    column.Paragraph(p => p.Bold("Tickets resolved per month"), style: SectionLabel());
                    column.Drawing(CreateTrendDrawing(), PdfAlign.Left, spacingBefore: 2, spacingAfter: 8);
                    column.Table(CreateServiceRows(), style: ServiceTableStyle());
                })
                .PercentColumn(42, column => {
                    column.Paragraph(p => p.Bold("Summary"), style: SectionLabel());
                    column.PanelParagraph(
                        p => p.Text("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 = PdfColor.FromRgb(248, 250, 252),
                            BorderColor = PdfColor.FromRgb(203, 213, 225),
                            BorderWidth = 0.7,
                            PaddingX = 10,
                            PaddingY = 8
                        });
                    column.Bullets(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 = 4, ItemSpacing = 2 });
                    column.Table(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.

using OfficeIMO.Pdf;

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

Choose the workflow you need

WorkflowUse it for
BuildReports, invoices, forms, labels, portfolios, and page-aware components
InspectText, pages, links, images, attachments, outlines, forms, revisions, and active-content diagnostics
TransformMerge, split, extract, reorder, rotate, stamp, watermark, overlay, and metadata changes
SecureCMS-backed signatures, timestamps, certificate validation, and revision-aware inspection through OfficeIMO.Security
RenderPage images and format adapters used by Word, Excel, PowerPoint, HTML, RTF, and OpenDocument packages

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 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 taskResult
InspectPage, encryption, form, annotation, attachment, active-content, signature-marker, and rewrite-readiness evidence
OrganizeMerge PDFs, split PDFs, extract PDF pages, delete PDF pages, reorder PDF pages, and rotate PDF pages without changing the selected source files
OptimizeDeterministic lossless optimization and Fast Web View profiles without rasterizing pages
Protect or unlockAES-256 Standard password protection, or a separate unprotected copy
RedactLiteral text removal followed by checks of extracted text, encoded strings, and decoded streams
CompareA self-contained visual gallery with expected, actual, and highlighted page differences

Browse every PDF workflow, open PDF tools, or download the showcase PDF used by the built-in samples.

Convert PDF content into editable formats

The workspace also exposes PDF to DOCX, detected PDF tables to XLSX, PDF to PPTX, and 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:

using OfficeIMO.Pdf;
using OfficeIMO.Word.Pdf;

PdfDocument pdf = PdfDocument.Load(File.ReadAllBytes("report.pdf"));
PdfWordConversionResult result = pdf.ToWordDocumentResult();
result.Value.Save("report.docx");

foreach (PdfConversionWarning warning in result.Report.Warnings) {
    Console.WriteLine($"{warning.Code}: {warning.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.
  • 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.

Same engine, other surfaces

Use OfficeIMO another way

Next step

Turn the package into a working document.

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

Example source

Download source