Class: BaseReaderControl

BaseReaderControl


new BaseReaderControl(options)

The base ReaderControl class

Parameters:
Name Type Description
options object

Options for the ReaderControl

Properties:
Name Type Description
PRINT_QUALITY int

Sets the print quality. Default is 1, higher values are higher quality but take longer to complete and use more memory.

Extends

Methods


closeDocument()

Closes the current document and cleans up its resources.


fitHeight()

Controls if the document's Zoom property will be adjusted so that the height of the current page or panel will exactly fit into the available space. Not supported by HTML5 viewers.

Inherited From:

fitPage()

Controls if the document's Zoom property will be adjusted so that the width and height of the current page or panel will fit into the available space. Not supported for mobile viewer.

Inherited From:

fitWidth()

Controls if the document's Zoom property will be adjusted so that the width of the current page or panel will exactly fit into the available space. Not supported for mobile viewer.

Inherited From:

fitZoom()

Sets the FitMode to Zoom, where the zoom level is free from pre-defined fit modes.

Inherited From:

getCurrentPageNumber()

Gets the current page number

Inherited From:
Returns:

the current page number

Type
integer

getFitMode()

Gets the current fit mode

Inherited From:
Returns:

the current fit mode

Type
object

getLayoutMode()

Gets the layout mode of the document. Not supported for mobile viewer.

Inherited From:
Returns:

the layout mode of the document


getPageCount()

Gets the total page count of the loaded document

Inherited From:
Returns:

the total page count of the loaded document

Type
integer

getShowSideWindow()

Gets the value whether the side window is visible or not. Not supported for mobile viewer.

Inherited From:
Returns:

true if the side window is shown


getToolMode()

Gets the current tool mode

Inherited From:
Returns:

the current tool mode

Type
object

getZoomLevel()

Gets the current zoom level

Inherited From:
Returns:

the current zoom level in float, where 1.0 is 100%.

Type
number

goToFirstPage()

Navigates to the first page of the document

Inherited From:

goToLastPage()

Navigates to the last page of the document

Inherited From:

goToNextPage()

Navigates to the next page of the document. This method will increment the current page number by 1, regardless of display modes (where more than 1 page is displayed at a time).

Inherited From:

goToPrevPage()

Navigates to the previous page of the document. This method will decrement the current page number by 1, regardless of display modes (where more than 1 page is displayed at a time).

Inherited From:

loadDocument(doc, options)

Loads a XOD document into the ReaderControl

Parameters:
Name Type Description
doc string

a URL path to a XOD file

options object

an object that contains options for loading a document. Possible properties are [streaming, decrypt, decryptOptions]

Properties
Name Type Description
streaming

a boolean that turns on chunked transfer encoding as a fallback if true.

decrypt

a function for handling XOD decryption

decryptOptions

an object containing options for XOD decryption

Overrides:

printHandler()

Triggers the display of the WebViewer print dialog


rotateClockwise()

Rotates the document viewer's orientation by 90 degrees clockwise.

Inherited From:

rotateCounterClockwise()

Rotates the document viewer's orientation by 90 degrees counter clockwise.

Inherited From:

saveAnnotations()

Saves the annotations using the specified serverURL


searchText(pattern, searchMode)

Searches the loaded document finding for the matching pattern.

Search mode includes:

  • None
  • CaseSensitive
  • WholeWord
  • SearchUp
  • PageStop
  • ProvideQuads
  • AmbientString
Parameters:
Name Type Description
pattern

the pattern to look for

searchMode

must one or a combination of the above search modes. To combine search modes, simply pass them as comma separated values in one string. i.e. "CaseSensitive,WholeWord"

Inherited From:

setCurrentPageNumber(pageNumber)

Sets the current page number and navigates to the specified page in the viewer.

Parameters:
Name Type Description
pageNumber integer

the new page number

Inherited From:

setFitMode(fitMode)

Sets the fit mode

Parameters:
Name Type Description
fitMode object

the object representing the fit mode

Inherited From:

setLayoutMode(layout)

Sets the layout mode of the document. Not supported for mobile viewer.

Parameters:
Name Type Description
layout

the layout mode to set

Inherited From:

setShowSideWindow(value)

Sets the value whether the side window is visible or not. Not supported for mobile viewer.

Parameters:
Name Type Description
value

true to show the side window

Inherited From:

setToolMode(toolMode)

Sets the tool mode

Parameters:
Name Type Description
toolMode object

the object representing the tool mode

Inherited From:

setZoomLevel(zoomLevel)

Sets the current zoom level

Parameters:
Name Type Description
zoomLevel number

the new zoom level, where 1.0 is 100%.

Inherited From:

toggleFullScreen()

Toggles whether the viewer is displayed fullscreen or not Note that this can only be successfully called from a user action, e.g. click handler