Skip to main content
Version: Version 5

Interface: DocumentViewPage

Represents a page in the document view, containing multiple layers for rendering page images, search results, and interactive elements.

Accessors​

accessibilityLayer​

Get Signature​

get accessibilityLayer(): AccessibilityLayer

Retrieves the accessibility layer. This layer contains invisible HTML elements aligned with the text fragments for accessibility purposes.

Returns​

AccessibilityLayer


container​

Get Signature​

get container(): HTMLDivElement

Gets the container element.

Returns​

HTMLDivElement


documentView​

Get Signature​

get documentView(): UIDocumentView

Gets the associated document view.

Returns​

UIDocumentView


image​

Set Signature​

set image(v): void

Sets the page image data for the page and updates the image layer.

Parameters​
v​

Image

The new image data.

Returns​

void


interactiveLayers​

Get Signature​

get interactiveLayers(): Layer<LayerNativeElementType>[]

Gets the array of interactive layers.

Returns​

Layer<LayerNativeElementType>[]

Set Signature​

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​

void


origin​

Get Signature​

get origin(): DocumentViewPoint

Gets the origin point of the page.

Returns​

DocumentViewPoint

Set Signature​

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​

void


pageImageLayer​

Get Signature​

get pageImageLayer(): PageImageLayer

Gets the page image layer.

Returns​

PageImageLayer


pageNumber​

Get Signature​

get pageNumber(): number

Gets the page number.

Returns​

number


searchResultsLayer​

Get Signature​

get searchResultsLayer(): SearchResultsLayer

Gets the search results layer.

Returns​

SearchResultsLayer

Set Signature​

set searchResultsLayer(v): void

Sets the search results layer and updates its size.

Parameters​
v​

SearchResultsLayer

Returns​

void


size​

Get Signature​

get size(): Size

Gets the size of the page.

Returns​

Size

Set Signature​

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​

void

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:

  1. The page image layer is added first, as it serves as the base layer.
  2. The search results layer is added on top of the page image layer.
  3. The interactive layers, if present, are added next to handle user interactions.
  4. The accessibility layer, if enabled, is added last to provide accessibility features.

Returns​

void


dispose()​

dispose(): void

Disposes of the document view page and all its layers. This method calls dispose on all layers to allow them to clean up resources, remove event listeners, or perform any necessary cleanup operations.

Returns​

void