Create, inspect, transform, render, sign, and validate PDF documents with OfficeIMO.Pdf. Includes examples and API links.
Install
dotnet add package OfficeIMO.Pdf
OfficeIMO.Pdf is the first-party PDF engine used by the OfficeIMO conversion packages. Use it directly for authored PDFs and PDF operations; add a format adapter such as OfficeIMO.Word.Pdf when the source is another document model.
Choose a workflow
| Goal | Guide |
|---|---|
| Build a PDF report, form, or positioned layout | Authoring and layout |
| Inspect, extract, merge, split, stamp, optimize, repair, or redact | Inspection, extraction, and operations |
| Encrypt, sign, verify, or preserve existing signed revisions | Security and digital signatures |
| Render Word, Excel, PowerPoint, HTML, Markdown, or open formats | Conversion and delivery |
The public surface also covers outlines and bookmarks, links, attachments, forms and widgets, annotations, fonts and fallback, text shaping diagnostics, metadata, page extraction, images, signatures, long-term validation evidence, and normalized Reader extraction. 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("Status report")
.Paragraph(p => p.Text("Created with ").Bold("OfficeIMO.Pdf"))
.Table(new[] {
new[] { "Area", "Status" },
new[] { "Build", "Ready" }
})))
.Meta(title: "Status report", author: "OfficeIMO")
.Save("status.pdf");
Pick the correct package
| Starting point | Package |
|---|---|
| Author or edit PDF | OfficeIMO.Pdf |
| Word document | OfficeIMO.Word.Pdf |
| Excel workbook | OfficeIMO.Excel.Pdf |
| PowerPoint presentation | OfficeIMO.PowerPoint.Pdf |
| HTML | OfficeIMO.Html.Pdf |
| Markdown | OfficeIMO.Markdown.Pdf |
| OpenDocument | OfficeIMO.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.