OfficeAiDocument
OfficeIMO.AI
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[]
- document OfficeIMO.Reader.OfficeDocumentReadResult
- images System.Collections.Generic.IEnumerable<OfficeIMO.AI.OfficeAiImage>? = null
- limits OfficeIMO.AI.OfficeAiLimits? = null
Returns
OfficeAiDocumentpublic 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
- source System.IO.Stream
- sourceName string
- limits OfficeIMO.AI.OfficeAiLimits? = null
- readerOptions OfficeIMO.Reader.ReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<OfficeAiDocument>Inherited Methods
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.