Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeAiDocument

Namespace OfficeIMO.AI
Assembly OfficeIMO.AI
Modifiers sealed

Immutable bounded source evidence. Original Reader objects and caller streams are not retained.

Inheritance

  • Object
  • OfficeAiDocument

Usage

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

Accepted by parameters

Methods

public static OfficeAiDocument FromReadResult(Byte[] sourceBytes, OfficeDocumentReadResult document, IEnumerable<OfficeAiImage> images = null, OfficeAiLimits limits = null) #
Returns: OfficeAiDocument

Captures a trusted adapter's read result and optional page images for the supplied original bytes. The adapter must enforce source permissions and ensure readback/images describe those bytes. This method copies observations; later mutations of the Reader result cannot change evidence.

Parameters

sourceBytes System.Byte[] requiredposition: 0
document OfficeIMO.Reader.OfficeDocumentReadResult requiredposition: 1
images System.Collections.Generic.IEnumerable{OfficeIMO.AI.OfficeAiImage} = null optionalposition: 2
limits OfficeIMO.AI.OfficeAiLimits = null optionalposition: 3
public static async Task<OfficeAiDocument> ReadAsync(OfficeDocumentReader reader, Stream source, String sourceName, OfficeAiLimits limits = null, ReaderOptions readerOptions = null, CancellationToken cancellationToken = default) #
Returns: Task<OfficeAiDocument>

Reads and fingerprints a bounded source snapshot. The caller retains ownership of the stream.

Parameters

reader OfficeIMO.Reader.OfficeDocumentReader requiredposition: 0
source System.IO.Stream requiredposition: 1
sourceName System.String requiredposition: 2
limits OfficeIMO.AI.OfficeAiLimits = null optionalposition: 3
readerOptions OfficeIMO.Reader.ReaderOptions = null optionalposition: 4
cancellationToken System.Threading.CancellationToken = default optionalposition: 5

Properties

public String SourceHash { get; } #

SHA-256 of the exact captured source bytes.

public String SnapshotHash { get; } #

SHA-256 binding source bytes to this exact evidence projection, page metadata, image payload identities and coverage state.

public Int32 SourceByteLength { get; } #

Number of original bytes captured for this snapshot.

public IReadOnlyList<OfficeAiEvidence> Evidence { get; } #

Immutable text observations in source order.

public IReadOnlyList<Int32> Pages { get; } #

All known one-based pages, including pages without text.

public IReadOnlyList<OfficeAiImage> Images { get; } #

Explicit inline images supplied by the source/rendering owner.

public String PageProvenance { get; } #

Reader's native/computed/explicit/unknown page provenance.

public Boolean HasSourceDiagnostics { get; } #

True when the source reader reported diagnostics; AI cannot certify complete source reconstruction.