OfficeIMO.Reader.Publisher 3.5.1

Prefix Reserved
dotnet add package OfficeIMO.Reader.Publisher --version 3.5.1
                    
NuGet\Install-Package OfficeIMO.Reader.Publisher -Version 3.5.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.Reader.Publisher" Version="3.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Reader.Publisher" Version="3.5.1" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Reader.Publisher" />
                    
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.Reader.Publisher --version 3.5.1
                    
#r "nuget: OfficeIMO.Reader.Publisher, 3.5.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.Reader.Publisher@3.5.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.Reader.Publisher&version=3.5.1
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Reader.Publisher&version=3.5.1
                    
Install as a Cake Tool

OfficeIMO.Reader.Publisher

OfficeIMO.Reader.Publisher reads native .pub publications through OfficeIMO.Publisher. It retains complete source stories, native table grids, bullet markers, physical page inventory, embedded-image descriptors and recovery diagnostics in the shared Reader result.

using OfficeIMO.Reader;
using OfficeIMO.Reader.Publisher;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddPublisherHandler(new ReaderPublisherOptions {
        ReadOptions = new OfficeIMO.Publisher.PublisherReadOptions {
            MaximumPages = 256
        },
        IncludeImagePayloads = false
    })
    .Build();

OfficeDocumentReadResult result = reader.ReadDocument("newsletter.pub",
    new ReaderOptions { MaxChars = 4_000, ComputeHashes = true });

foreach (OfficeDocumentBlock block in result.Blocks)
    Console.WriteLine(block.Text);
int tableIndex = 0;
foreach (ReaderTable table in result.EnumerateTables())
    File.WriteAllText($"table-{++tableIndex}.csv", table.ToCsv());
foreach (OfficeDocumentDiagnostic diagnostic in result.Diagnostics)
    Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");

The handler is also part of OfficeIMO.Reader.All. Its stable registration ID is officeimo.reader.publisher; configure it through ReaderAllOptions.Publisher. Content detection recognizes the compound-file Contents and Quill stream pair, including publications with an unfamiliar filename extension. The native codec then validates the actual supported generation.

Projection contract

Every source story appears once in native story order, including text that overflows its printable frames. Ordinary stories use paragraph blocks; a mapped table story uses one table block containing its complete text. Blocks preserve source characters and carry a story anchor, paragraph index and logical order that survives canonical traversal, JSON transport and semantic PDF projection. Native bullet labels remain separate markers; Markdown uses an ordinary list marker and escapes literal source punctuation. Character references preserve indentation without turning source paragraphs into Markdown code blocks. Long paragraphs split into bounded chunks without discarding text or separating a UTF-16 surrogate pair.

Pages describes recovered physical pages and their dimensions. Ordinary story paragraphs and images have no inferred page assignment. Mapped tables and their story blocks carry native physical-page citations. Page artwork, frame flow and typography remain available in the native Publisher model and are omitted from this semantic projection with PUB_READER_LAYOUT_OMITTED. Use OfficeIMO.Publisher.Pdf for positioned output. Native recovery findings retain their codes, loss kinds and source locations in Reader diagnostics.

Native table rows are available through Tables, the owning page, and the first table-story chunk. EnumerateTables() returns each source table once across these views, including after JSON transport. Column names use Column 1, Column 2, and so on; the first source row remains data. Merged cell text occupies its first row/column and covered positions are empty, with PUB_READER_TABLE_SPANS_FLATTENED approximation evidence. The native spans and styled paragraphs remain in PublisherPage.Tables.

Master-owned tables are extracted once without a physical-page citation. Their TableIndex values are document-wide ordinals, so table export filenames stay distinct across master owners. Repeated table objects keep distinct occurrence anchors; the complete source-story block correlates with the first mapped table. Shared-story chunks carry a page citation only when every mapped occurrence agrees on it, preserving master ownership during table extraction. Page Markdown and semantic PDF render each structured grid once. Unresolved native text mappings retain complete stories and an omission report; Reader does not present unknown cell text as an empty dataset. Semantic PDF projection correlates the table story block with its rows to avoid repeated text.

Image descriptors contain native image-store IDs, media types and byte counts. Set IncludeImagePayloads = true to retain detached copies of the original bytes. With ComputeHashes = true, retained payloads also receive hashes. External links are not fetched and active content is not executed.

Limits and source identity

Registration snapshots ReaderPublisherOptions and its native read settings. ReaderOptions.MaxInputBytes can tighten the native input ceiling. Native item and text ceilings also bound projection work, and shared Reader resource limits apply to emitted chunks, pages and assets. MaximumPages counts both document and master definitions. MaxTableRows limits each structured table. Shared Reader settings clamp zero and negative values to one. Truncation records the total row count and an omission diagnostic. Complete story blocks and chunks remain available, while semantic table exports and PDF projection use the bounded rows and retain the loss report.

Stream input follows Reader's whole-stream snapshot contract: seekable streams are read from the beginning, their original position is restored, and the caller's stream stays open. Non-seekable streams are captured from their current forward position. Source hashes cover the captured bytes.

Selected Publisher 2002-and-later Contents/Quill publications are qualified. Earlier generations throw NotSupportedException; they do not fall back to text salvage. Malformed native data and exceeded native limits fail explicitly. See the native support contract and fixture evidence. The adapter references only OfficeIMO.Reader.Core and OfficeIMO.Publisher.

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

Showing the top 1 NuGet packages that depend on OfficeIMO.Reader.Publisher:

Package Downloads
OfficeIMO.Reader.All

Composition-only preset for registering OfficeIMO.Reader's local format adapters.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.5.1 154 10/16/2026