Class: DocumentViewPage
Represents a page in the document view, containing multiple layers for rendering page images, search results, and interactive elements.
Constructors
new DocumentViewPage()
new DocumentViewPage(
documentView
,pageNumber
):DocumentViewPage
Creates an instance of DocumentViewPage.
Parameters
• documentView: DocumentView
The parent document view.
• pageNumber: number
The page number.
Returns
Accessors
accessibilityLayer
get
accessibilityLayer():AccessibilityLayer
Retrieves the accessibility layer. This layer contains invisible HTML elements aligned with the text fragments for accessibility purposes.
Returns
container
get
container():HTMLDivElement
Gets the container element.
Returns
HTMLDivElement
documentView
get
documentView():DocumentView
Gets the associated document view.
Returns
image
set
image(v
):void
Sets the page image data for the page and updates the image layer.
Parameters
• v: Image
The new image data.
interactiveLayers
get
interactiveLayers():Layer
<LayerNativeElementType
>[]
Gets the array of interactive layers.
set
interactiveLayers(v
):void
Sets the interactive layers, updating their placement within the container. Each layer's size is updated to match the page size and the container is refreshed to maintain the correct layer stacking order.
Parameters
• v: Layer
<LayerNativeElementType
>[]
Returns
Layer
<LayerNativeElementType
>[]
origin
get
origin():DocumentViewPoint
Gets the origin point of the page.
set
origin(v
):void
Sets the origin of the page and updates its position within the document view.
Parameters
• v: DocumentViewPoint
The new origin point.
Returns
DocumentViewPoint
pageImageLayer
get
pageImageLayer():PageImageLayer
Gets the page image layer.
Returns
pageNumber
get
pageNumber():number
Gets the page number.
Returns
number
searchResultsLayer
get
searchResultsLayer():SearchResultsLayer
Gets the search results layer.
set
searchResultsLayer(v
):void
Sets the search results layer and updates its size.
Parameters
• v: SearchResultsLayer
Returns
size
get
size():Size
Gets the size of the page.
set
size(v
):void
Sets the size of the page and updates the dimensions of associated layers.
Parameters
• v: Size
The new size of the page.
Returns
Methods
appendAllLayers()
appendAllLayers():
void
Appends the various layers (page image, search results, interactive, and accessibility layers) to the container element of the document view page.
This method ensures that the layers are added in the correct order:
- The page image layer is added first, as it serves as the base layer.
- The search results layer is added on top of the page image layer.
- The interactive layers, if present, are added next to handle user interactions.
- The accessibility layer, if enabled, is added last to provide accessibility features.
Returns
void