Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeDocumentReadResult

OfficeIMO.Reader

Namespace
OfficeIMO.Reader
Assembly
OfficeIMO.Reader.Core
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Shared result envelope for document readback workflows.

Inheritance

  • object
  • OfficeDocumentReadResult

Usage

Explore 87 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 64

Constructors

public OfficeDocumentReadResult() #

Properties

public string SchemaId { get; set; } #

Result schema identifier.

public int SchemaVersion { get; set; } #

Result schema version.

public ReaderInputKind Kind { get; set; } #

Source input kind that produced this result.

public OfficeDocumentSource Source { get; set; } #

Source document metadata used for citations and incremental processing.

public IReadOnlyList<string> CapabilitiesUsed { get; set; } #

Capability identifiers used while producing this result.

public string? Markdown { get; set; } #

Portable Markdown representation when available.

public string? Html { get; set; } #

Portable or review HTML representation when available.

public string? Json { get; set; } #

Deterministic JSON representation when a producer emits one.

public IReadOnlyList<ReaderChunk> Chunks { get; set; } #

Reader chunks produced by the same extraction run.

public IReadOnlyList<OfficeDocumentMetadataEntry> Metadata { get; set; } #

Document-level metadata entries discovered during reading.

public IReadOnlyList<OfficeDocumentPage> Pages { get; set; } #

Page, slide, sheet, or diagram-page records produced by document reading.

public IReadOnlyList<OfficeDocumentBlock> Blocks { get; set; } #

Normalized logical blocks in source order.

public IReadOnlyList<ReaderTable> Tables { get; set; } #

Structured tables extracted or detected during reading.

public IReadOnlyList<OfficeDocumentAsset> Assets { get; set; } #

Images, previews, and other binary or visual assets discovered during reading.

public IReadOnlyList<OfficeDocumentFormField> Forms { get; set; } #

Form fields or widgets discovered during reading.

public IReadOnlyList<OfficeDocumentOcrCandidate> OcrCandidates { get; set; } #

Regions that likely need OCR before text extraction can be considered complete.

public IReadOnlyList<ReaderVisual> Visuals { get; set; } #

Structured visual payloads discovered during reading.

public IReadOnlyList<OfficeDocumentDiagnostic> Diagnostics { get; set; } #

Warnings and diagnostics emitted during reading.

public IReadOnlyList<OfficeDocumentNestedResult> NestedDocuments { get; set; } #
JsonIgnore(Condition = 3)

Complete rich results for nested documents, scoped by their container-relative or virtual path.

Extension Methods

public static IReadOnlyDictionary<string, string> BuildAssetDataUriMap(OfficeDocumentReadResult result, OfficeDocumentAssetDataUriOptions? options = null) #

Builds a data URI map keyed by asset id for materializable assets in a read result.

Parameters

result OfficeIMO.Reader.OfficeDocumentReadResult required
Read result that owns the assets.
options OfficeIMO.Reader.OfficeDocumentAssetDataUriOptions? = null optional
Data URI options.

Returns

IReadOnlyDictionary<string, string>
public static IEnumerable<OfficeDocumentBlock> EnumerateBlocks(OfficeDocumentReadResult document) #

Enumerates document-level and page-level blocks in canonical source order, retaining each stable ID or anchor once. Blocks without either identity are deduplicated only by object reference, preserving unlabelled repeated text. Missing locations inherit their page context by reference or stable identity without changing the source. Results may refer to source objects or location projections; they are not immutable snapshots.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

IEnumerable<OfficeDocumentBlock>
public static IEnumerable<OfficeDocumentContentItem> EnumerateContent(OfficeDocumentReadResult document) #

Enumerates blocks and tables together in canonical source order. Chunks supply text only when no blocks contain text. Tables inherit a matching source block's position through their stable anchor. Table rows remain part of their table. Unpositioned content retains its encounter order after positioned content in the same container. Results reference source payloads or location projections and are not immutable snapshots.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

IEnumerable<OfficeDocumentContentItem>
public static IEnumerable<ReaderTable> EnumerateTables(OfficeDocumentReadResult document) #

Enumerates tables from document, page and chunk projections using the Reader's canonical duplicate handling. Page-only tables inherit missing location information from their page. Results may refer to source model objects.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

IEnumerable<ReaderTable>
public static IEnumerable<ReaderVisual> EnumerateVisuals(OfficeDocumentReadResult document) #

Enumerates document and chunk visual projections using the Reader's canonical duplicate handling.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

IEnumerable<ReaderVisual>
public static IReadOnlyList<ReaderTableExportBundle> ExportTables(OfficeDocumentReadResult document, bool indentedJson = false, CancellationToken cancellationToken = default) #

Exports discovered tables as deterministic CSV, Markdown and JSON payloads.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
indentedJson bool = false optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<ReaderTableExportBundle>
public static IReadOnlyList<ReaderVisualExportBundle> ExportVisuals(OfficeDocumentReadResult document, bool indentedJson = false, CancellationToken cancellationToken = default) #

Exports discovered visuals and JSON sidecars.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
indentedJson bool = false optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<ReaderVisualExportBundle>
public static IReadOnlyList<OfficeDocumentAsset> ExtractAssets(OfficeDocumentReadResult document, Func<OfficeDocumentAsset, bool>? predicate = null, CancellationToken cancellationToken = default) #

Extracts assets already attached to a materialized read.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
predicate System.Func<OfficeIMO.Reader.OfficeDocumentAsset, bool>? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<OfficeDocumentAsset>
public static OfficeDocumentStructuredExtractionResult ExtractStructured(OfficeDocumentReadResult document, OfficeDocumentStructuredExtractionOptions? options = null, CancellationToken cancellationToken = default) #

Extracts a bounded structured view from a materialized read.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
options OfficeIMO.Reader.OfficeDocumentStructuredExtractionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static IReadOnlyList<ReaderTable> ExtractTables(OfficeDocumentReadResult document, CancellationToken cancellationToken = default) #

Extracts tables from a materialized read without reading the source again.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<ReaderTable>
public static IReadOnlyList<ReaderVisual> ExtractVisuals(OfficeDocumentReadResult document, CancellationToken cancellationToken = default) #

Extracts visuals from a materialized read.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<ReaderVisual>
public static IReadOnlyList<OfficeDocumentPageMarkdown> GetPageMarkdown(OfficeDocumentReadResult document, OfficeDocumentPageMarkdownOptions? options = null) #

Projects every page-like container into a separate Markdown value suitable for citations and RAG.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
options OfficeIMO.Reader.OfficeDocumentPageMarkdownOptions? = null optional

Returns

IReadOnlyList<OfficeDocumentPageMarkdown>
public static OfficeDocumentPageProvenance GetPageProvenance(OfficeDocumentReadResult document) #

Returns the page provenance advertised by the producing adapter.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
public static IReadOnlyList<OfficeDocumentPageText> GetPageText(OfficeDocumentReadResult document, CancellationToken cancellationToken = default) #

Projects each existing page-like container into plain text with its original citation metadata.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<OfficeDocumentPageText>
public static string GetText(OfficeDocumentReadResult document, CancellationToken cancellationToken = default) #

Projects canonical blocks and tables into plain text without rereading the source.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public static int GetTotalPageCount(OfficeDocumentReadResult document) #

Returns the best available total physical page count for this read result.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

int
Locate 2 overloads
public static IReadOnlyList<OfficeDocumentPageLocation> Locate(OfficeDocumentReadResult document, OfficeDocumentBlock block) #

Locates a normalized block in every page-like container that references it.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
block OfficeIMO.Reader.OfficeDocumentBlock required

Returns

IReadOnlyList<OfficeDocumentPageLocation>
public static IReadOnlyList<OfficeDocumentPageLocation> Locate(OfficeDocumentReadResult document, string blockId) #

Locates a normalized block by its stable identifier.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
blockId string required

Returns

IReadOnlyList<OfficeDocumentPageLocation>
public static OfficeDocumentSearchResult Search(OfficeDocumentReadResult document, string query, OfficeDocumentSearchOptions? options = null, CancellationToken cancellationToken = default) #

Searches normalized document blocks and attaches page-like locations to every occurrence.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required
query string required
options OfficeIMO.Reader.OfficeDocumentSearchOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static IReadOnlyList<OfficeDocumentMaterializedAsset> StreamAssets(OfficeDocumentReadResult result, Action<OfficeDocumentAsset, Stream> writeAsset, OfficeDocumentAssetMaterializationOptions? options = null, CancellationToken cancellationToken = default) #

Streams materializable asset payloads to a caller-owned callback without writing files.

Parameters

result OfficeIMO.Reader.OfficeDocumentReadResult required
Read result that owns the assets.
writeAsset System.Action<OfficeIMO.Reader.OfficeDocumentAsset, System.IO.Stream> required
Callback that receives each asset and a readable payload stream.
options OfficeIMO.Reader.OfficeDocumentAssetMaterializationOptions? = null optional
Materialization options.
cancellationToken System.Threading.CancellationToken = default optional
Cancellation token.

Returns

IReadOnlyList<OfficeDocumentMaterializedAsset>
public static string ToJson(OfficeDocumentReadResult result, bool indented = false) #

Serializes a document read result into the stable OfficeIMO transport shape.

Parameters

result OfficeIMO.Reader.OfficeDocumentReadResult required
Read result to serialize.
indented bool = false optional
When true, writes indented JSON for diagnostics and fixtures.

Returns

string
public static string ToPageMarkedMarkdown(OfficeDocumentReadResult document) #

Projects all page-like containers into one Markdown string separated by portable page markers.

Parameters

document OfficeIMO.Reader.OfficeDocumentReadResult required

Returns

string
public static IReadOnlyList<OfficeDocumentMaterializedAsset> WriteAssetsToDirectory(OfficeDocumentReadResult result, string directoryPath, OfficeDocumentAssetMaterializationOptions? options = null, CancellationToken cancellationToken = default) #

Writes materializable asset payloads to directoryPath using each asset's deterministic filename.

Parameters

result OfficeIMO.Reader.OfficeDocumentReadResult required
Read result that owns the assets.
directoryPath string required
Destination directory.
options OfficeIMO.Reader.OfficeDocumentAssetMaterializationOptions? = null optional
Materialization options.
cancellationToken System.Threading.CancellationToken = default optional
Cancellation token.

Returns

IReadOnlyList<OfficeDocumentMaterializedAsset>