API Reference
OfficeAiDocument
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.
Returned or exposed by
Accepted by parameters
Methods
public static OfficeAiDocument FromReadResult(Byte[] sourceBytes, OfficeDocumentReadResult document, IEnumerable<OfficeAiImage> images = null, OfficeAiLimits limits = null) #OfficeAiDocumentCaptures 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[]
- document OfficeIMO.Reader.OfficeDocumentReadResult
- images System.Collections.Generic.IEnumerable{OfficeIMO.AI.OfficeAiImage} = null
- limits OfficeIMO.AI.OfficeAiLimits = null
public static async Task<OfficeAiDocument> ReadAsync(OfficeDocumentReader reader, Stream source, String sourceName, OfficeAiLimits limits = null, ReaderOptions readerOptions = null, CancellationToken cancellationToken = default) #Task<OfficeAiDocument>Reads and fingerprints a bounded source snapshot. The caller retains ownership of the stream.
Parameters
- reader OfficeIMO.Reader.OfficeDocumentReader
- source System.IO.Stream
- sourceName System.String
- limits OfficeIMO.AI.OfficeAiLimits = null
- readerOptions OfficeIMO.Reader.ReaderOptions = null
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.