OfficeIMO.Word.Pdf 2.0.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package OfficeIMO.Word.Pdf --version 2.0.1
                    
NuGet\Install-Package OfficeIMO.Word.Pdf -Version 2.0.1
                    
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.Word.Pdf" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Word.Pdf" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Word.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.Word.Pdf --version 2.0.1
                    
#r "nuget: OfficeIMO.Word.Pdf, 2.0.1"
                    
#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.Word.Pdf@2.0.1
                    
#: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.Word.Pdf&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Word.Pdf&version=2.0.1
                    
Install as a Cake Tool

OfficeIMO.Word.Pdf - Word/PDF conversion

nuget version nuget downloads

OfficeIMO.Word.Pdf exports OfficeIMO.Word documents to PDF through the first-party OfficeIMO.Pdf engine and imports parser-supported PDF logical content into editable Word documents. It is the adapter layer: Word stays responsible for the .docx model, while PDF layout, reading, diagnostics, and writing stay in OfficeIMO.Pdf.

Install

dotnet add package OfficeIMO.Word.Pdf

Quick start

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

using var document = WordDocument.Create("report.docx");
document.AddParagraph("PDF export").Style = WordParagraphStyles.Heading1;
document.AddParagraph("This document is exported through OfficeIMO.Pdf.");

document.SaveAsPdf("report.pdf");

Examples

Export with page and metadata options

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

using var document = WordDocument.Load("proposal.docx");

var options = new PdfSaveOptions {
    Orientation = PdfPageOrientation.Portrait,
    Margins = PageMargins.UniformCentimeters(1.5),
    Title = "Customer proposal",
    Author = "Evotec",
    IncludePageNumbers = true,
    PageNumberFormat = "Page {current} of {total}"
};

document.SaveAsPdf("proposal.pdf", options);

Export to bytes or streams

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

using var document = WordDocument.Load("invoice.docx");

byte[] pdfBytes = document.ToPdf();

using var stream = File.Create("invoice.pdf");
document.SaveAsPdf(stream);

Capture conversion warnings without throwing away the report

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

using var document = WordDocument.Load("complex-document.docx");
var options = new PdfSaveOptions {
    DefaultTableBorders = true
};

var result = document.TrySaveAsPdf("complex-document.pdf", options);
if (!result.Succeeded) {
    foreach (string diagnostic in result.Diagnostics) {
        Console.WriteLine(diagnostic);
    }
}

foreach (var warning in result.Warnings) {
    Console.WriteLine($"{warning.Source}: {warning.Message}");
}

Import logical PDF tables into Word

using OfficeIMO.Word.Pdf;

var imported = PdfWordTableConverterExtensions.SaveTablesAsWordDocument(
    "statement.pdf",
    "statement-tables.docx");

foreach (var table in imported) {
    Console.WriteLine($"Page {table.PageNumber}, table {table.TableIndex + 1}");
}

Import semantic PDF content into Word

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

var options = new PdfWordReadOptions {
    LayoutOptions = new PdfTextLayoutOptions {
        ForceSingleColumn = true
    }
};

var import = File.ReadAllBytes("packet.pdf").ToWordDocumentFromPdfResult(options);
using WordDocument word = import.Value;
byte[] docx = word.ToBytes();

foreach (var warning in import.Warnings) {
    Console.WriteLine($"{warning.Code}: {warning.Message}");
}

The semantic import path preserves document metadata, page breaks, headings, paragraphs, lists, logical tables, safe URI hyperlinks, supported internal destination links, embedded images, form-widget placeholders, and conversion diagnostics when those structures are available in the PDF logical model. It creates an editable Word document; it does not claim fixed-layout page recreation or Microsoft Word rendering parity.

What it exports

  • Paragraphs, headings, rich runs, links, bookmarks, page breaks, lists, and common spacing/indentation settings.
  • Word sections, page size, orientation, margins, columns, headers, footers, page numbers, and document background color.
  • Tables with common Word table styling, repeated headers, cell fills, borders, alignment, merged cells, and rich text in cells.
  • Paragraph-aligned images, selected shapes, text boxes, content controls, simple form controls, footnote/endnote markers, and table-of-contents links where supported by the first-party PDF path.
  • Per-operation conversion warnings through PdfDocumentConversionResult.Report or PdfSaveResult.Report.

What it imports

  • Parser-supported PDF metadata, page breaks, headings, paragraphs, lists, logical tables, safe URI hyperlinks, supported internal destination links, complete image-file payloads with transparency-mask fidelity metadata, supported ImageMask stencil streams, color-key masked simple and Indexed streams, Decode-aware soft-mask-capable simple DeviceGray/DeviceRGB/basic-converted DeviceCMYK streams, basic ICCBased N=1/3/4 streams, and Decode-aware soft-mask-capable Indexed palette PDF image streams into editable .docx content when their filters are supported.
  • Image fallback placeholders and form-widget placeholders with diagnostics instead of silently dropping unsupported objects.
  • Page-range filtered imports through PdfWordReadOptions.PageRanges.
  • Active hyperlink reconstruction for absolute http, https, and mailto URI annotations through PdfWordReadOptions.ImportUriLinks and PdfWordReadOptions.AllowedHyperlinkUriSchemes.
  • Internal PDF destination reconstruction through PdfWordReadOptions.ImportInternalLinks, mapping supported page and named destinations to Word bookmarks and anchor hyperlinks.
  • Native image embedding through PdfWordReadOptions.ImportImages; complete image files, supported ImageMask stencil streams, color-key masked simple and Indexed streams, Decode-aware soft-mask-capable simple 8-bit DeviceGray/DeviceRGB/basic-converted DeviceCMYK streams, basic ICCBased N=1/3/4 streams, and Decode-aware soft-mask-capable Indexed palette streams are embedded when their filters are supported. Pass-through JPEG image payloads with unresolved PDF transparency masks are embedded with PdfImageTransparencyMaskNotResolved; unsupported complex PDF image streams can still produce editable placeholders through PdfWordReadOptions.IncludeImagePlaceholders.
  • Per-operation import warnings through PdfWordConversionResult.Report.

Options and diagnostics

Use PdfSaveOptions when callers need to override page geometry, metadata, page-number behavior, font family, table-border fallback, profile presets, or text fallback policy. TextFallbacks uses the shared PdfTextFallbackFeatures enum; set AllowSystemFontEmbedding = true when Word export may embed installed host fonts for Unicode, symbols, and emoji. Request ToPdfDocumentResult() or TrySaveAsPdf() when diagnostics matter; unsupported Word features should become actionable operation results instead of mutable option state.

Boundaries

  • This package does not try to be a full Word renderer with perfect Microsoft Word parity or a fixed-layout PDF-to-DOCX recreation engine.
  • PDF-to-Word import is semantic reconstruction over parser-supported logical PDF objects. Complex/unsupported PDF image streams, interactive controls, unresolved destinations, and remote/cross-document PDF navigation actions are not yet reconstructed as native Word objects.
  • Unsupported or simplified Word features should surface warnings rather than being hidden in the README as broad claims.
  • Reusable PDF layout work belongs in OfficeIMO.Pdf; Word-specific mapping belongs here.
  • PowerShell PDF workflows should be exposed through PSWriteOffice.

Targets and license

Dependency footprint

  • External: None beyond the dependencies of its OfficeIMO format packages; no browser, native renderer, or commercial PDF SDK.
  • OfficeIMO: OfficeIMO.Word, OfficeIMO.Pdf, and OfficeIMO.Drawing own the source model, PDF engine, mapping, and reports.

See the complete OfficeIMO package map for related formats and conversion paths.

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 (2)

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

Package Downloads
Ank.DocToolkit

Convert HTML to DOCX and PDF, and open/edit DOCX, XLSX and PPTX - pure managed, no native binaries, no browser, no LibreOffice. Runs on Linux.

OfficeIMO.OpenDocument.Pdf

Direct loss-aware OpenDocument text, spreadsheet, and presentation to PDF adapters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.3 1,796 7/27/2026
3.0.2 137 7/26/2026
3.0.1 386 7/26/2026
3.0.0 502 7/20/2026
2.0.1 260 7/14/2026
2.0.0 97 7/14/2026
1.0.49 287 7/9/2026
1.0.48 319 7/8/2026
1.0.47 485 7/5/2026
1.0.46 242 7/4/2026
1.0.45 1,133 6/27/2026
1.0.44 177 6/27/2026
1.0.43 434 6/24/2026
1.0.42 222 6/23/2026
1.0.41 343 6/21/2026
1.0.40 192 6/16/2026
1.0.39 371 6/16/2026
1.0.38 708 6/15/2026
1.0.37 297 6/13/2026
1.0.36 266 6/12/2026
Loading failed