Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

Create, inspect, transform, render, sign, and validate PDF documents with OfficeIMO.Pdf. Includes examples and API links.

Packages
Works with
  • .NET
Target frameworks
netstandard2.0, net10.0, net472
Verified
Examples compiled against the source on

Create, read and change PDF files in .NET with OfficeIMO's own PDF engine — no third-party PDF library, browser or Office installation.

  • Create reports, invoices and forms from headings, paragraphs, tables, lists, images, drawings, headers and footers, with embedded fonts.
  • Read text, tables, images, links, attachments and form values, or export the content as Markdown or JSON.
  • Merge, split and organize pages: extract, reorder, rotate, crop, duplicate, delete, stamp and watermark.
  • Fill forms and keep them editable, or flatten the values into the page.
  • Protect files with AES-256 passwords and permissions, or remove protection with the owner password.
  • Sign with certificate-based signatures (PAdES B-B and B-T) and validate existing signatures.
  • Redact text and areas permanently, with a verification report for every removed match.
  • Produce standard output: PDF/A, PDF/UA, PDF/X, Factur-X and ZUGFeRD, checked against the saved bytes, and convert existing PDFs to PDF/A with a report of every change.
  • Render pages to PNG, JPEG, TIFF, WebP or SVG, and compare two PDFs page by page.
  • Print to installed printers on Windows, macOS and Linux, with page ranges, 1, 2, 4, 6 or 9 pages per sheet, scaling, duplex and paper source, through OfficeIMO.Workflows.
  • Convert Word, Excel, PowerPoint, HTML and Markdown to PDF, and PDF back to Word, Excel, PowerPoint, HTML or Markdown.

Task guides

Install

dotnet add package OfficeIMO.Pdf

OfficeIMO.Pdf depends only on OfficeIMO.Core. Add a format adapter such as OfficeIMO.Word.Pdf when the source is another document model, and OfficeIMO.Security for certificate signatures.

Choose a workflow

GoalGuide
Build a PDF report, form, or positioned layoutAuthoring and layout
Inspect, extract, merge, split, stamp, optimize, convert to PDF/A, repair, redact, or printInspection, extraction, and operations
Encrypt, sign, verify, or preserve existing signed revisionsSecurity and digital signatures
Convert Word, Excel, PowerPoint, HTML, Markdown, or open formatsConversion and delivery

The PDF API reference is generated from the built assembly and is the complete type-level index.

Create a PDF

using OfficeIMO.Pdf;

PdfDocument.Create(pdf => pdf.Content(content => content
        .H1("Service review")
        .AddParagraph("All scheduled checks passed. Two follow-ups remain open.")
        .AddTable(new[] {
            new[] { "Task", "Owner", "Due" },
            new[] { "Rotate certificates", "Platform", "4 Nov" } })))
    .Meta(title: "Service review", author: "Operations")
    .Save("Service-review.pdf");

Read text and tables

using OfficeIMO.Pdf;

PdfDocumentReadResult result = PdfDocument.Load("Service-review.pdf").Read();
foreach (PdfLogicalPage page in result.Pages) {
    Console.WriteLine($"Page {page.PageNumber}: {page.Paragraphs.Count} paragraphs, {page.Tables.Count} tables");
}
Console.WriteLine(result.ExtractMarkdown());

Pick the correct package

Starting pointPackage
Author or edit PDFOfficeIMO.Pdf
Word documentOfficeIMO.Word.Pdf
Excel workbookOfficeIMO.Excel.Pdf
PowerPoint presentationOfficeIMO.PowerPoint.Pdf
HTMLOfficeIMO.Html.Pdf
MarkdownOfficeIMO.Markdown.Pdf
OpenDocumentOfficeIMO.OpenDocument.Odt.Pdf, .Ods.Pdf, or .Odp.Pdf

Use the PDF API reference for type-level detail. For conversion, inspect returned diagnostics before accepting approximated or omitted features.

Production checks

  • Preflight incoming PDFs before extraction or mutation.
  • Separate “can read” from “can safely rewrite.”
  • Apply explicit limits to untrusted page trees, streams, attachments, and decompression.
  • Validate font availability and international-text shaping on the deployment host.
  • Verify redaction by re-extracting content; an opaque drawing alone is not redaction.
  • Treat signature structure, cryptographic validity, certificate trust, later revisions, and certification permissions as separate decisions.
  • Reopen generated output and assert the semantic features your workflow depends on.

Example source