VOOZH about

URL: https://www.nuget.org/packages/OfficeIMO.Pdf/

⇱ NuGet Gallery | OfficeIMO.Pdf 0.1.41




👁 Image
OfficeIMO.Pdf 0.1.41

Prefix Reserved
dotnet add package OfficeIMO.Pdf --version 0.1.41
 
 
NuGet\Install-Package OfficeIMO.Pdf -Version 0.1.41
 
 
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="0.1.41" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Pdf" Version="0.1.41" />
 
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 0.1.41
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OfficeIMO.Pdf, 0.1.41"
 
 
#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@0.1.41
 
 
#: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=0.1.41
 
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Pdf&version=0.1.41
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

OfficeIMO.Pdf - Dependency-free PDF engine

👁 nuget version
👁 nuget downloads

OfficeIMO.Pdf is the first-party PDF package for OfficeIMO. It creates, reads, inspects, edits, merges, splits, stamps, and exports PDFs without runtime package dependencies.

If OfficeIMO saves you time, please consider supporting the work through GitHub Sponsors or PayPal. PowerShell users should use PSWriteOffice for the PowerShell-facing experience.

Install

dotnet add package OfficeIMO.Pdf

Quick start

using OfficeIMO.Pdf;

PdfDocument.Create(new PdfOptions {
 DefaultFont = PdfStandardFont.Helvetica,
 DefaultFontSize = 11
 })
 .Meta(title: "Hello PDF", author: "OfficeIMO")
 .H1("OfficeIMO.Pdf")
 .Paragraph(p => p
 .Text("A dependency-free PDF builder with ")
 .Bold("rich text")
 .Text(", links, tables, images, and document operations."))
 .Table(new[] {
 new[] { "Area", "Status" },
 new[] { "Runtime dependencies", "None in OfficeIMO.Pdf" },
 new[] { "License", "MIT" }
 })
 .Save("hello.pdf");

What it does

  • Creates PDFs with page setup, headings, paragraphs, rich text, links, lists, panels, rows/columns, tables, images, vector drawing, headers, footers, watermarks, metadata, and form primitives.
  • Reads and inspects PDFs through text extraction, logical document objects, page metadata, links, images, attachments, outlines, forms, active-content diagnostics, and security/revision markers.
  • Manipulates existing PDFs with page extraction, split, merge, delete, duplicate, move, rotate, metadata editing, stamps, and watermarks.
  • Provides conversion reports and diagnostics so adapters can expose unsupported or simplified source content honestly.
  • Serves as the shared engine for Word, Excel, Markdown, HTML, and PowerPoint PDF adapters.

Existing PDF workflows

using OfficeIMO.Pdf;

PdfDocument.Open("input.pdf")
 .Pages.Extract("1-2,4")
 .MergeWith("appendix.pdf")
 .UpdateMetadata(title: "Merged report")
 .Stamp.Text("Reviewed")
 .Save("output.pdf");

string text = PdfDocument.Open("output.pdf").Read.Text();

Examples

Write a generated PDF

using OfficeIMO.Pdf;

PdfDocument.Create(new PdfOptions {
 PageSize = PageSizes.A4,
 Margins = PageMargins.UniformCentimeters(1.6),
 DefaultFont = PdfStandardFont.Helvetica,
 DefaultFontSize = 10
 })
 .Meta(
 title: "Service report",
 author: "OfficeIMO",
 subject: "Generated PDF")
 .Header(h => h.AlignCenter().Text("Service report"))
 .Footer(f => f.AlignRight().Text("Page {page} of {pages}"))
 .H1("Service report")
 .Paragraph(p => p
 .Text("Generated ")
 .Bold(DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm 'UTC'"))
 .Text(" with first-party PDF primitives."))
 .Table(new[] {
 new[] { "System", "Status", "Owner" },
 new[] { "Identity", "Green", "Operations" },
 new[] { "Messaging", "Yellow", "Exchange" }
 })
 .Save("service-report.pdf");

Rich report layout

PdfDocument.Create()
 .H1("Operational summary")
 .Paragraph(p => p
 .Text("Generated ")
 .Bold(DateTime.Today.ToString("yyyy-MM-dd"))
 .Text(" with links, lists, panels, and tables."))
 .Bullets(list => list
 .Item("No runtime package dependencies")
 .Item("Word-like document flow")
 .Item("Reusable PDF primitives for adapters"))
 .Panel(panel => panel
 .H2("Review note")
 .Paragraph(p => p.Text("Keep polished report designs in samples; keep reusable primitives in the engine.")))
 .Table(new[] {
 new[] { "Area", "Status" },
 new[] { "Layout", "Ready" },
 new[] { "Reading", "Evolving" }
 })
 .Save("summary.pdf");

Read text, Markdown, tables, images, and attachments

using OfficeIMO.Pdf;

using var pdf = PdfDocument.Open("statement.pdf");

string text = pdf.Read.Text();
string firstPages = pdf.Read.Text("1-2");
string markdown = pdf.Read.Markdown();
IReadOnlyList<string> pages = pdf.Read.TextByPage();
PdfLogicalDocument logical = pdf.Read.Logical();

foreach (var table in logical.Tables) {
 Console.WriteLine($"Table on page {table.PageNumber}: {table.Rows.Count} rows");
}

string markdownTables = PdfLogicalTableTextExportExtensions.ExtractMarkdownTables("statement.pdf");
IReadOnlyList<PdfExtractedImage> images = pdf.Read.Images();
IReadOnlyList<PdfExtractedAttachment> attachments = pdf.Read.Attachments();

Split and extract pages

using OfficeIMO.Pdf;

using var source = PdfDocument.Open("packet.pdf");

source.Pages.Extract("1-3")
 .Save("cover-and-summary.pdf");

IReadOnlyList<PdfDocument> singlePageDocuments = source.Pages.Split();
for (int index = 0; index < singlePageDocuments.Count; index++) {
 singlePageDocuments[index].Save($"packet-page-{index + 1:000}.pdf");
}

Merge, reorder, delete, duplicate, move, and rotate

using OfficeIMO.Pdf;

PdfDocument.Open("packet.pdf")
 .MergeWith("appendix.pdf")
 .Pages.Delete("2,5-6")
 .Pages.Duplicate("1")
 .Pages.Move(insertBeforePageNumber: 3, pageRanges: "7-8")
 .Pages.Rotate(90, "4")
 .UpdateMetadata(title: "Cleaned packet")
 .Save("packet-clean.pdf");

Stamp and watermark an existing PDF

using OfficeIMO.Pdf;

PdfDocument.Open("contract.pdf")
 .Stamp.Text("Reviewed", new PdfTextStampOptions {
 X = 72,
 Y = 720,
 FontSize = 18,
 Color = PdfColor.FromRgb(180, 30, 30)
 })
 .Stamp.TextWatermark("CONFIDENTIAL", new PdfTextStampOptions {
 FontSize = 54,
 Color = PdfColor.Gray,
 RotationDegrees = -35
 })
 .Save("contract-reviewed.pdf");

Fill and flatten a PDF form

using OfficeIMO.Pdf;

PdfDocument.Open("application-form.pdf")
 .Forms.FillAndFlatten(new Dictionary<string, string> {
 ["Applicant.Name"] = "Adele Vance",
 ["Applicant.Email"] = "adele@example.com",
 ["Approval.Status"] = "Approved"
 })
 .Save("application-form-filled.pdf");

Page setup, watermarks, and metadata

PdfDocument.Create(new PdfOptions {
 PageSize = PageSize.FromCentimeters(21, 29.7).Portrait(),
 Margins = PageMargins.UniformCentimeters(1.5),
 TextWatermark = new PdfTextWatermark("DRAFT") {
 Opacity = 0.12,
 RotationAngle = -35
 }
 })
 .Meta(title: "Draft report", author: "OfficeIMO")
 .H1("Draft report")
 .Paragraph("This document uses page-level options instead of post-processing.")
 .Save("draft.pdf");

Inspect and preflight before rewriting

using OfficeIMO.Pdf;

byte[] bytes = File.ReadAllBytes("incoming.pdf");
PdfDocumentPreflight preflight = PdfInspector.Preflight(bytes);

if (!preflight.Can(PdfPreflightCapability.ManipulatePages)) {
 foreach (string diagnostic in preflight.GetCapabilityDiagnostics(PdfPreflightCapability.ManipulatePages)) {
 Console.WriteLine(diagnostic);
 }
}

var result = PdfDocument.Open(bytes).Pages.TryExtract(PdfPageSelection.Parse("1-2"));
if (result.Succeeded) {
 result.RequireValue().Save("incoming-first-pages.pdf");
}

Inspect before automating

using var pdf = PdfDocument.Open("incoming.pdf");

var inspection = pdf.Inspect();
Console.WriteLine($"Pages: {inspection.PageCount}");
Console.WriteLine($"Links: {inspection.LinkAnnotationCount}");
Console.WriteLine($"Forms: {inspection.FormFields.Count}");
Console.WriteLine($"Active content: {inspection.HasActiveContent}");

foreach (var page in inspection.Pages) {
 Console.WriteLine($"{page.PageNumber}: {page.Width} x {page.Height}");
}

Convert PDFs through adapter packages

using OfficeIMO.Excel.Pdf;
using OfficeIMO.Html.Pdf;
using OfficeIMO.Word;
using OfficeIMO.Word.Pdf;

using var word = WordDocument.Load("proposal.docx");
word.SaveAsPdf("proposal.pdf");

PdfExcelTableConverterExtensions.SavePdfTablesAsExcel(
 "bank-statement.pdf",
 "bank-statement-tables.xlsx");

PdfHtmlConverter.SaveAsHtml(
 "proposal.pdf",
 "proposal-review.html",
 new PdfHtmlSaveOptions {
 Profile = PdfHtmlProfile.PositionedReview,
 IncludeLinkAnnotations = true,
 IncludeFormWidgets = true
 });

Conversion adapters

Package Role
Maps Word documents into PDF primitives.
Maps Excel workbooks into PDF primitives.
Maps Markdown documents into PDF primitives.
Maps PowerPoint slides into PDF primitives.
Bridges HTML to PDF and PDF to HTML.

Boundaries

  • OfficeIMO.Pdf should stay dependency-free at runtime. Rasterizers, visual comparison tools, and external renderers belong in tests or development tooling.
  • Polished invoice, report, and statement examples belong in samples and visual fixtures, not as special engine concepts.
  • Adapter-specific mapping belongs in the source adapter packages. Shared PDF layout, reading, and manipulation behavior belongs here.
  • Current-state inventories belong in , not in this NuGet README.

Current state

The PDF engine is useful and broad, but it is still evolving. It has strong first-party coverage for common generated business documents and conservative read/manipulation workflows, while advanced typography, complex PDF preservation, encryption/decryption, and signature validation remain deeper roadmap areas.

For the full capability inventory and roadmap, read .

Targets and license

Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 is compatible.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on OfficeIMO.Pdf:

Package Downloads
OfficeIMO.Reader

Unified, read-only document extraction facade for OfficeIMO (Word/Excel/PowerPoint/Markdown/PDF) intended for AI ingestion.

OfficeIMO.Word.Pdf

PDF converter for OfficeIMO.Word - Export Word documents to PDF using the first-party OfficeIMO.Pdf engine.

OfficeIMO.Markdown.Pdf

PDF converter for OfficeIMO.Markdown - Export Markdown documents 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.Excel.Pdf

PDF converter for OfficeIMO.Excel - Export Excel workbooks to PDF using the first-party OfficeIMO.Pdf engine.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.41 282 6/16/2026
0.1.40 372 6/16/2026
0.1.39 481 6/15/2026
0.1.38 645 6/13/2026
0.1.37 643 6/12/2026
0.1.36 583 6/9/2026
0.1.35 748 6/5/2026
0.1.34 489 5/27/2026
0.1.33 441 5/26/2026
0.1.32 448 5/26/2026
0.1.31 467 5/23/2026
0.1.30 442 5/22/2026
0.1.29 451 5/21/2026
0.1.28 437 5/21/2026
0.1.27 435 5/20/2026
0.1.26 420 5/19/2026
0.1.25 408 5/18/2026
0.1.24 484 5/16/2026
0.1.23 437 5/14/2026
0.1.22 431 5/14/2026
Loading failed