Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeAiDocument

OfficeIMO.AI

Namespace
OfficeIMO.AI
Assembly
OfficeIMO.AI
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

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

Inheritance

  • object
  • OfficeAiDocument

Usage

Explore 7 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.

Returned or exposed by 2

Accepted by parameters 5

Methods

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

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 byte[] required
document OfficeIMO.Reader.OfficeDocumentReadResult required
images System.Collections.Generic.IEnumerable<OfficeIMO.AI.OfficeAiImage>? = null optional
limits OfficeIMO.AI.OfficeAiLimits? = null optional
public static async Task<OfficeAiDocument> ReadAsync(OfficeDocumentReader reader, Stream source, string sourceName, OfficeAiLimits? limits = null, ReaderOptions? readerOptions = null, CancellationToken cancellationToken = default) #

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

Parameters

reader OfficeIMO.Reader.OfficeDocumentReader required
source System.IO.Stream required
sourceName string required
limits OfficeIMO.AI.OfficeAiLimits? = null optional
readerOptions OfficeIMO.Reader.ReaderOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeAiDocument>

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 int SourceByteLength { get; } #

Number of original bytes captured for this snapshot.

public IReadOnlyList<OfficeAiEvidence> Evidence { get; } #

Immutable text observations in source order.

public IReadOnlyList<int> 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 bool HasSourceDiagnostics { get; } #

True when the source or a nested document reports limitations, pending OCR or truncated content; AI cannot certify complete source reconstruction.