ProgressivePDFLoader
Defined in: src/document/progressive.ts:54
Progressive PDF loader for linearised documents.
Allows checking linearisation status and loading documents using PDFium’s availability API. Supports both complete buffers and incremental data feeds.
Example
Section titled “Example”using loader = ProgressivePDFLoader.fromBuffer(pdfBytes, module, memory);if (loader.isLinearised) { console.log('Document is linearised');}using document = loader.getDocument();Extends
Section titled “Extends”Accessors
Section titled “Accessors”disposed
Section titled “disposed”Get Signature
Section titled “Get Signature”get disposed():
boolean
Defined in: src/core/disposable.ts:73
Whether this resource has been disposed.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”firstPageNumber
Section titled “firstPageNumber”Get Signature
Section titled “Get Signature”get firstPageNumber():
number
Defined in: src/document/progressive.ts:182
Get the first available page number (useful for linearised documents). Returns -1 if no document is available yet.
Returns
Section titled “Returns”number
isDocumentAvailable
Section titled “isDocumentAvailable”Get Signature
Section titled “Get Signature”get isDocumentAvailable():
boolean
Defined in: src/document/progressive.ts:155
Check whether the full document data is available.
Returns
Section titled “Returns”boolean
isLinearised
Section titled “isLinearised”Get Signature
Section titled “Get Signature”get isLinearised():
boolean
Defined in: src/document/progressive.ts:148
Convenience check for whether the document is linearised.
Returns
Section titled “Returns”boolean
linearisationStatus
Section titled “linearisationStatus”Get Signature
Section titled “Get Signature”get linearisationStatus():
LinearisationStatus
Defined in: src/document/progressive.ts:137
Check if the document is linearised.
Returns
Section titled “Returns”The linearisation status
Methods
Section titled “Methods”[dispose]()
Section titled “[dispose]()”[dispose]():
void
Defined in: src/core/disposable.ts:148
Dispose of this resource, freeing WASM memory.
This method is idempotent - calling it multiple times has no effect after the first call.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”dispose()
Section titled “dispose()”dispose():
void
Defined in: src/core/disposable.ts:164
Alias for Symbol.dispose for explicit calls.
Returns
Section titled “Returns”void
Example
Section titled “Example”document.dispose();Inherited from
Section titled “Inherited from”getDocument()
Section titled “getDocument()”getDocument(
password?):PDFiumDocument
Defined in: src/document/progressive.ts:205
Get the document once enough data is available.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
password? | string | Optional password for encrypted documents |
Returns
Section titled “Returns”The loaded document
Throws
Section titled “Throws”If the document is not yet available or cannot be loaded
isPageAvailable()
Section titled “isPageAvailable()”isPageAvailable(
pageIndex):boolean
Defined in: src/document/progressive.ts:169
Check whether a specific page is available.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
pageIndex | number | Zero-based page index |
Returns
Section titled “Returns”boolean