ProgressiveRenderContext
Defined in: src/document/progressive-render.ts:39
Context for progressive PDF page rendering.
Owns the bitmap and buffer resources for the lifetime of the render.
Implements Symbol.dispose for ES2024 using keyword support.
Example
Section titled “Example”using render = page.startProgressiveRender({ scale: 2 });
while (render.status === ProgressiveRenderStatus.ToBeContinued) { render.continue(); await scheduler.yield();}
if (render.status === ProgressiveRenderStatus.Done) { const result = render.getResult();}Extends
Section titled “Extends”Implements
Section titled “Implements”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”height
Section titled “height”Get Signature
Section titled “Get Signature”get height():
number
Defined in: src/document/progressive-render.ts:95
Rendered height in pixels.
Returns
Section titled “Returns”number
Rendered height in pixels.
Implementation of
Section titled “Implementation of”IProgressiveRenderContext.height
status
Section titled “status”Get Signature
Section titled “Get Signature”get status():
ProgressiveRenderStatus
Defined in: src/document/progressive-render.ts:85
Current render status.
Returns
Section titled “Returns”Current render status.
Implementation of
Section titled “Implementation of”IProgressiveRenderContext.status
Get Signature
Section titled “Get Signature”get width():
number
Defined in: src/document/progressive-render.ts:90
Rendered width in pixels.
Returns
Section titled “Returns”number
Rendered width in pixels.
Implementation of
Section titled “Implementation of”IProgressiveRenderContext.width
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
Implementation of
Section titled “Implementation of”IProgressiveRenderContext.[dispose]
Inherited from
Section titled “Inherited from”continue()
Section titled “continue()”continue():
ProgressiveRenderStatus
Defined in: src/document/progressive-render.ts:106
Continue the progressive render.
Call this in a loop while status is ToBeContinued.
Returns
Section titled “Returns”The updated render status
Implementation of
Section titled “Implementation of”IProgressiveRenderContext.continue
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”getResult()
Section titled “getResult()”getResult():
RenderResult
Defined in: src/document/progressive-render.ts:133
Get the render result.
Only valid when status is Done. Reads the bitmap buffer and
converts BGRA to RGBA format.
Returns
Section titled “Returns”The rendered pixel data
Throws
Section titled “Throws”If the render is not complete