Class: PDFPageProxy

PDFPageProxy()

Proxy to a PDFPage in the worker thread.

Constructor

new PDFPageProxy()

Source:

Members

pageNumber

Source:

ref

Source:

rotate

Source:

stats

Source:

userUnit

Source:

view

Source:

Methods

_destroy()

Destroys page object.
Source:

cleanup(resetStats)

Cleans up resources allocated by the page.
Parameters:
Name Type Default Description
resetStats boolean false (optional) Reset page stats, if enabled. The default value is `false`.
Source:

getAnnotations(params) → {Promise}

Parameters:
Name Type Description
params GetAnnotationsParameters Annotation parameters.
Source:
Returns:
A promise that is resolved with an {Array} of the annotation objects.
Type
Promise

getOperatorList() → {Promise}

Source:
Returns:
A promise resolved with an PDFOperatorList object that represents page's operator list.
Type
Promise

getTextContent(params) → {Promise}

Parameters:
Name Type Description
params getTextContentParameters getTextContent parameters.
Source:
Returns:
That is resolved a TextContent object that represent the page text content.
Type
Promise

getViewport(scale, rotate, dontFlip) → {PageViewport}

Parameters:
Name Type Default Description
scale number The desired scale of the viewport.
rotate number Degrees to rotate the viewport. If omitted this defaults to the page rotation.
dontFlip boolean false (optional) If true, axis Y will not be flipped.
Source:
Returns:
Contains 'width' and 'height' properties along with transforms required for rendering.
Type
PageViewport

render(params) → {RenderTask}

Begins the process of rendering a page to the desired context.
Parameters:
Name Type Description
params RenderParameters Page render parameters.
Source:
Returns:
An object that contains the promise, which is resolved when the page finishes rendering.
Type
RenderTask

streamTextContent(params) → {ReadableStream}

Parameters:
Name Type Description
params getTextContentParameters getTextContent parameters.
Source:
Returns:
ReadableStream to read textContent chunks.
Type
ReadableStream