OfficeIMO.Pdf
3.6.2
Prefix Reserved
dotnet add package OfficeIMO.Pdf --version 3.6.2
NuGet\Install-Package OfficeIMO.Pdf -Version 3.6.2
<PackageReference Include="OfficeIMO.Pdf" Version="3.6.2" />
<PackageVersion Include="OfficeIMO.Pdf" Version="3.6.2" />
<PackageReference Include="OfficeIMO.Pdf" />
paket add OfficeIMO.Pdf --version 3.6.2
#r "nuget: OfficeIMO.Pdf, 3.6.2"
#:package OfficeIMO.Pdf@3.6.2
#addin nuget:?package=OfficeIMO.Pdf&version=3.6.2
#tool nuget:?package=OfficeIMO.Pdf&version=3.6.2
OfficeIMO.Pdf
Create, read and change PDF files in .NET with OfficeIMO's own PDF engine — no third-party PDF library, browser or Office installation.
What it does
- 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.
- Remove hidden data before sharing: metadata, comments, scripts and other active content, attachments, bookmarks and layers, with the same
InspectHiddenDataandRemoveHiddenDatareport as the Office formats. - Produce standard output: PDF/A, PDF/UA, PDF/X, Factur-X and ZUGFeRD, checked against the saved bytes.
- Check accessibility of any PDF against PDF/UA-1 with the Matterhorn Protocol conditions:
PdfDocument.Load(path).Proof.CheckAccessibility()locates each failure by page, object and tag, and lists the checks a person still has to review. - Render pages to PNG, JPEG, TIFF, WebP or SVG, and compare two PDFs page by page.
- Redline two versions of a document: compare their text word by word and mark insertions, deletions, replacements and moves on the newer PDF, with a JSON change list and a side-by-side HTML report.
- 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.
Install
dotnet add package OfficeIMO.Pdf
OfficeIMO.Pdf depends only on OfficeIMO.Core. It targets netstandard2.0, net8.0 and net10.0, plus net472 on Windows. Add an optional package only when you need its workflow:
| To | Add |
|---|---|
| Sign with certificates or validate CMS signatures | OfficeIMO.Security |
| Save Word, Excel or PowerPoint as PDF | OfficeIMO.Word.Pdf, OfficeIMO.Excel.Pdf, OfficeIMO.PowerPoint.Pdf |
| Convert HTML to PDF, or PDF to HTML | OfficeIMO.Html.Pdf |
| Save Markdown as PDF | OfficeIMO.Markdown.Pdf |
| Convert PDF to Word, Excel or PowerPoint | OfficeIMO.Pdf.Word, OfficeIMO.Pdf.Excel, OfficeIMO.Pdf.PowerPoint |
| Read scanned pages with an OCR provider | OfficeIMO.Pdf.Ocr |
| Render an invoice with its Factur-X XML | OfficeIMO.Invoicing.Pdf |
| Print to an installed printer | OfficeIMO.Workflows |
| Full OpenType shaping for complex scripts | OfficeIMO.Drawing.HarfBuzz |
Examples
Each example uses using OfficeIMO.Pdf;, and page numbers and ranges are 1-based. Page, merge and form operations return a new document; save it to a different path to keep the source file.
Create a report
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");
Embedded fonts follow their OS/2 fsType licence, read the least restrictive way when several permissions are set. A font that forbids embedding or allows only bitmaps is never embedded: writing a document that uses it as a registered font family throws NotSupportedException, and an installed fallback face like that is skipped. A font that forbids subsetting is embedded whole.
Read text and tables
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());
Read() returns paragraphs, headings, lists and tables per page. The reading guide covers decoding diagnostics, form values and scanned pages; use PdfLoadOptions.UntrustedDefaults for files from outside your organization.
Merge, rotate and split
This example combines the report with an Appendix.pdf of your own.
PdfDocument.Load("Service-review.pdf")
.MergeWith("Appendix.pdf")
.Pages.Rotate(90, "2")
.Save("Review-pack.pdf");
IReadOnlyList<PdfDocument> parts = PdfDocument.Load("Review-pack.pdf").Pages.Split();
for (int i = 0; i < parts.Count; i++) parts[i].Save($"Review-pack-{i + 1}.pdf");
Fill a form
This example fills Application.pdf, a form with Applicant.Name and Approval.Status text fields. The forms guide shows how to create one.
PdfDocument.Load("Application.pdf")
.Forms.FillAndFlatten(new Dictionary<string, string> {
["Applicant.Name"] = "Adele Vance",
["Approval.Status"] = "Approved"
})
.Save("Application-filled.pdf");
Use Forms.Fill to keep the fields editable.
Protect with a password
PdfSecurityMutationResult protectedPdf = PdfDocument.Load("Service-review.pdf")
.Security.Encrypt(new PdfStandardEncryptionOptions("open-password") {
OwnerPassword = "owner-password"
});
File.WriteAllBytes("Service-review-protected.pdf", protectedPdf.Pdf);
Render a page to PNG
PdfPageRenderResult preview = PdfDocument.Load("Service-review.pdf")
.Render.Pages("1", new PdfPageRenderOptions { Dpi = 144 })[0];
File.WriteAllBytes("Service-review-page-1.png", preview.Bytes!);
Pages with a supported destination ICC output profile and explicit transparency are composited before relative-colorimetric soft proofing. Their per-page reports include render.colorspace.icc-output-intent-post-composition as supported. SVG embeds the proofed raster surface; text extraction and the retained drawing scene keep their text and geometry. Other color-profile and transparency limitations remain diagnostic-driven; see the producer corpus for the qualified cases.
More
- PDF guide: every workflow with examples, from page layout and fonts to signatures, redaction, PDF/A and deployment.
- PDF current state: what each workflow covers and where its limits are.
- PDF conversion support and the generated operation contract.
- Examples, the migration guide and PSWriteOffice for PowerShell (
New-OfficePdf,Open-OfficePdf).
MIT licensed.
Generated capability summary
This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.
| Operation | Supported | Partial | Preserved | Rejected | Unsupported | Not applicable |
|---|---|---|---|---|---|---|
| Create | 3 | 0 | 0 | 0 | 0 | 0 |
| Read | 3 | 0 | 0 | 0 | 0 | 0 |
| Edit | 2 | 0 | 0 | 0 | 1 | 0 |
| Preserve | 0 | 1 | 0 | 0 | 0 | 0 |
| Inspect | 4 | 0 | 0 | 0 | 0 | 0 |
| Validate | 2 | 0 | 0 | 0 | 0 | 2 |
| Remove | 2 | 0 | 0 | 1 | 0 | 0 |
| Convert | 0 | 2 | 0 | 0 | 0 | 0 |
| Export | 5 | 0 | 0 | 0 | 0 | 0 |
The complete rows for OfficeIMO.Pdf are published in the generated operation contract.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- OfficeIMO.Core (>= 3.6.2)
-
.NETStandard 2.0
- OfficeIMO.Core (>= 3.6.2)
-
net10.0
- OfficeIMO.Core (>= 3.6.2)
-
net8.0
- OfficeIMO.Core (>= 3.6.2)
NuGet packages (27)
Showing the top 5 NuGet packages that depend on OfficeIMO.Pdf:
| Package | Downloads |
|---|---|
|
OfficeIMO.Word.Pdf
PDF converter for OfficeIMO.Word - Export Word documents to PDF using the first-party OfficeIMO.Pdf engine. |
|
|
OfficeIMO.Excel.Pdf
PDF converter for OfficeIMO.Excel - Export Excel workbooks to PDF using the first-party OfficeIMO.Pdf engine. |
|
|
OfficeIMO.PowerPoint.Pdf
PDF converter for OfficeIMO.PowerPoint - Export PowerPoint presentations to PDF using the first-party OfficeIMO.Pdf engine. |
|
|
OfficeIMO.Html.Pdf
HTML-to-PDF conversion, PDF-backed HTML image export, and PDF-to-HTML semantic and positioned-review conversion for OfficeIMO. |
|
|
OfficeIMO.Reader.Pdf
PDF reader and normalized PDF projection bridge for OfficeIMO.Reader. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.6.2 | 2,406 | 11/18/2026 |
| 3.6.1 | 5,490 | 11/10/2026 |
| 3.6.0 | 2,946 | 11/6/2026 |
| 3.5.3 | 9,011 | 10/31/2026 |
| 3.5.2 | 9,068 | 10/24/2026 |
| 3.5.1 | 3,266 | 10/16/2026 |
| 3.4.5 | 2,127 | 10/10/2026 |
| 3.4.4 | 4,138 | 9/27/2026 |
| 3.4.3 | 1,504 | 9/12/2026 |
| 3.4.2 | 1,026 | 9/9/2026 |
| 3.4.1 | 942 | 9/7/2026 |
| 3.4.0 | 822 | 9/6/2026 |
| 3.3.0 | 113,504 | 9/2/2026 |
| 3.2.7 | 6,369 | 8/29/2026 |
| 3.2.6 | 4,766 | 8/22/2026 |
| 3.2.5 | 946 | 8/21/2026 |
| 3.2.4 | 954 | 8/19/2026 |
| 3.2.3 | 802 | 8/17/2026 |
| 3.2.2 | 4,150 | 8/13/2026 |
| 3.2.1 | 859 | 8/11/2026 |