Members
commonObjs :PDFObjects
Type:
- PDFObjects
filterFactory :Object
The filter factory instance.
Type:
- Object
isPureXfa :boolean
True if only XFA form.
Type:
- boolean
pageNumber :number
Page number of the page. First page is 1.
Type:
- number
ref :RefProxy|null
The reference that points to this page.
Type:
- RefProxy | null
rotate :number
The number of degrees the page is rotated clockwise.
Type:
- number
stats :StatTimer|null
Returns page stats, if enabled; returns `null` otherwise.
Type:
- StatTimer | null
userUnit :number
The default size of units in 1/72nds of an inch.
Type:
- number
view :Array:.<number:>
An array of the visible portion of the PDF page in user space units [x1, y1, x2, y2].
Type:
Methods
(delayedopt) → {boolean}
Attempts to clean up if rendering is in a state where that's possible.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
delayed |
boolean |
<optional> |
false | Delay the cleanup, to e.g. improve zooming performance in documents with large images. The default value is `false`. |
Returns:
Indicates if clean-up was successfully run.
- Type
- boolean
cleanup(resetStatsopt) → {boolean}
Cleans up resources allocated by the page.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
resetStats |
boolean |
<optional> |
false | Reset page stats, if enabled. The default value is `false`. |
Returns:
Indicates if clean-up was successfully run.
- Type
- boolean
getAnnotations(paramsopt) → {Promise:.<Array:.<any:>>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
GetAnnotationsParameters |
<optional> |
Annotation parameters. |
Returns:
A promise that is resolved with an
{Array} of the annotation objects.
getJSActions() → {Promise:.<Object:>}
Returns:
A promise that is resolved with an
{Object} with JS actions.
getOperatorList(params) → {Promise:.<PDFOperatorList:>}
Parameters:
Name | Type | Description |
---|---|---|
params |
GetOperatorListParameters | Page getOperatorList parameters. |
Returns:
A promise resolved with an
PDFOperatorList object that represents the page's operator list.
getStructTree() → {Promise:.<StructTreeNode:>}
Returns:
A promise that is resolved with a
StructTreeNode object that represents the page's structure tree,
or `null` when no structure tree is present for the current page.
getTextContent(params) → {Promise:.<TextContent:>}
NOTE: All occurrences of whitespace will be replaced by
standard spaces (0x20).
Parameters:
Name | Type | Description |
---|---|---|
params |
getTextContentParameters | getTextContent parameters. |
Returns:
A promise that is resolved with a
TextContent object that represents the page's text content.
getViewport(params) → {PageViewport}
Parameters:
Name | Type | Description |
---|---|---|
params |
GetViewportParameters | Viewport parameters. |
Returns:
Contains 'width' and 'height' properties
along with transforms required for rendering.
- Type
- PageViewport
(async) getXfa() → {Promise:.<(Object:|null:)>}
Returns:
A promise that is resolved with
an {Object} with a fake DOM object (a tree structure where elements
are {Object} with a name, attributes (class, style, ...), value and
children, very similar to a HTML DOM tree), or `null` if no XFA exists.
render(params) → {RenderTask}
Begins the process of rendering a page to the desired context.
Parameters:
Name | Type | Description |
---|---|---|
params |
RenderParameters | Page render parameters. |
Returns:
An object that contains a promise that is
resolved when the page finishes rendering.
- Type
- RenderTask
streamTextContent(params) → {ReadableStream}
NOTE: All occurrences of whitespace will be replaced by
standard spaces (0x20).
Parameters:
Name | Type | Description |
---|---|---|
params |
getTextContentParameters | getTextContent parameters. |
Returns:
Stream for reading text content chunks.
- Type
- ReadableStream