DocumentReader
Defined in: src/core/ir/adapters.ts:31
A synchronous reader for one source format (ir-design §7). All async I/O — font fetching, resource loading — lives in the conversion facade, not here.
The adapter contracts may change until they stabilize against three or more adapters.
Type Parameters
Section titled “Type Parameters”TDoc = FlowDoc
Properties
Section titled “Properties”
readonlyid:string
Defined in: src/core/ir/adapters.ts:33
Format id: ‘docx’, ‘xlsx’, ‘pdf’, …
produces
Section titled “produces”
readonlyproduces:"flow"|"page"|"sheet"
Defined in: src/core/ir/adapters.ts:35
Which tree this reader produces (‘sheet’ projects to flow at the boundary).
read: (
bytes,opts?) =>ReadResult<TDoc>
Defined in: src/core/ir/adapters.ts:40
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”ReadResult<TDoc>
sniff: (
bytes) =>boolean
Defined in: src/core/ir/adapters.ts:39
Cheap format detection (magic bytes / container markers).
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”boolean
supports
Section titled “supports”
readonlysupports:ReadonlySet<string>
Defined in: src/core/ir/adapters.ts:37
Feature vocabulary this reader understands (capability matrix source).