OfficeIMO.Pdf 3.6.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package OfficeIMO.Pdf --version 3.6.0
                    
NuGet\Install-Package OfficeIMO.Pdf -Version 3.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Pdf" Version="3.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Pdf" Version="3.6.0" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Pdf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Pdf --version 3.6.0
                    
#r "nuget: OfficeIMO.Pdf, 3.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Pdf@3.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Pdf&version=3.6.0
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Pdf&version=3.6.0
                    
Install as a Cake Tool

OfficeIMO.Pdf

nuget version nuget downloads

Create, read, edit and combine PDF files in .NET. OfficeIMO.Pdf is OfficeIMO's own PDF engine, with no third-party PDF library, browser or Office installation. It also fills forms, stamps and redacts pages, protects files with passwords and checks PDF/A and PDF/UA output.

Install

dotnet add package OfficeIMO.Pdf

Optional packages:

dotnet add package OfficeIMO.Security       # certificate signatures
dotnet add package OfficeIMO.Pdf.Ocr        # searchable scans, with an OCR provider
dotnet add package OfficeIMO.Pdf.Word       # PDF to Word; also .Pdf.Excel and .Pdf.PowerPoint

To turn Word, Excel, PowerPoint or Markdown into PDF, install the source format's adapter (OfficeIMO.Word.Pdf, OfficeIMO.Excel.Pdf, OfficeIMO.PowerPoint.Pdf, OfficeIMO.Markdown.Pdf) and call SaveAsPdf on that document.

Targets netstandard2.0, net8.0 and net10.0, plus net472 on Windows.

Create a report

using OfficeIMO.Pdf;

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

Page margins follow the Modern theme unless PdfCreateOptions.Theme names another. PdfCreateOptions also sets the page size, fonts, tagging and compliance profile.

A single flow spacer is limited to 1,000 page or column traversal steps and cannot exceed 1,000 configured page heights. Larger spacing fails with InvalidDataException. Set MaxGeneratedPages when the total output page count also needs a limit.

Read text and tables

using OfficeIMO.Pdf;

PdfDocument pdf = PdfDocument.Load("Service-review.pdf");
PdfDocumentReadResult result = 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());

For files from outside your organization, pass PdfLoadOptions with read limits, as shown in the guide.

Combine, split and reorder pages

using OfficeIMO.Pdf;

PdfDocument.Load("Service-review.pdf")
    .MergeWith("Service-review.pdf")
    .Pages.Rotate(90, "2")
    .UpdateMetadata(title: "Review pack")
    .Save("Review-pack.pdf");

PdfDocument pack = PdfDocument.Load("Review-pack.pdf");
pack.Pages.Extract("1").Save("Cover.pdf");
IReadOnlyList<PdfDocument> pages = pack.Pages.Split();
for (int i = 0; i < pages.Count; i++) pages[i].Save($"Review-pack-{i + 1}.pdf");

Page operations return a new document; the source file is never changed in place. Page numbers and ranges are 1-based.

Pages.Insert, Pages.Append and Pages.Prepend retain ordinary AcroForm fields. Incoming name collisions use suffixes such as Shared_source2; hierarchical fields keep their parent and sibling relationships. General merge keeps only the primary form by default; choose Forms = PdfMergeStructureMode.Combine to retain incoming fields. See the page composition guide for form, action and signature restrictions.

Fill a form

using OfficeIMO.Pdf;

PdfDocument.Create(pdf => pdf.Content(content => content
        .H1("Application")
        .TextField("Applicant.Name")
        .TextField("Approval.Status")))
    .Save("Application.pdf");

PdfDocument.Load("Application.pdf")
    .Forms.FillAndFlatten(new Dictionary<string, string> {
        ["Applicant.Name"] = "Adele Vance",
        ["Approval.Status"] = "Approved"
    })
    .Save("Application-filled.pdf");

Forms.Fill keeps the fields editable; FillAndFlatten makes the values part of the page.

Protect with a password

using OfficeIMO.Pdf;

PdfDocument.Create(pdf => pdf.Content(content => content
        .H1("Salaries 2027")
        .AddParagraph(p => p.AddText("Confidential."))),
        new PdfCreateOptions().SetEncryption("open-password", ownerPassword: "owner-password"))
    .Save("Salaries.pdf");

Convert a PDF back to Word

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

PdfDocument pdf = PdfDocument.Load("Service-review.pdf");
OfficeConversionReport report = pdf.SaveAsWord("Service-review.docx");
Console.WriteLine($"Loss: {report.HasLoss}");

Reconstruction from a fixed-layout PDF is semantic: paragraphs, headings, lists and tables come back as editable Word content, and the report lists what could not be recovered.

More

Dependencies: OfficeIMO.Core only; the PDF parser, writer, renderer and password encryption are OfficeIMO code. 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 2 0 0 0 0 0
Read 2 0 0 0 0 0
Edit 2 0 0 0 0 0
Preserve 0 1 0 0 0 0
Inspect 3 0 0 0 0 0
Validate 2 0 0 0 0 1
Remove 2 0 0 0 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (25)

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.1 421 11/10/2026
3.6.0 1,193 11/6/2026
3.5.3 4,584 10/31/2026
3.5.2 5,981 10/24/2026
3.5.1 2,936 10/16/2026
3.4.5 1,973 10/10/2026
3.4.4 3,619 9/27/2026
3.4.3 1,485 9/12/2026
3.4.2 860 9/9/2026
3.4.1 937 9/7/2026
3.4.0 816 9/6/2026
3.3.0 89,698 9/2/2026
3.2.7 6,308 8/29/2026
3.2.6 4,592 8/22/2026
3.2.5 940 8/21/2026
3.2.4 950 8/19/2026
3.2.3 794 8/17/2026
3.2.2 4,084 8/13/2026
3.2.1 849 8/11/2026
3.2.0 3,882 8/7/2026
Loading failed