The TXDocumentViewer JavaScript object provides a public API to manipulate the document viewer via JavaScript functions in the browser.




Method Description
addEventListener The addEventListener function registers event listener functions on the TXDocumentViewer object.
cancelSearch Cancels a currently active search process.
downloadDocument Downloads the current document as an Adobe PDF document.
find Finds a string in the currently loaded document.
getValues Returns an array of all contained form fields with it's values completed by the user.
loadDocument Loads a document from memory into the DocumentViewer.
lockZoom Locks the zoom to 100%.
nextSearchResult Moves to the next found search result and scrolls the DocumentViewer to that location.
printDocument Prints the content of the document using browser printing functionality.
scrollToPage Scrolls to the specific page in the currently loaded document.
selectSearchBox Selects the search input box in the DocumentViewer and sets the focus into it.
showFormsBar Gets or sets whether to show an information bar that informs the user that a document contains fillable forms.
toggleFullScreen Toggles between the browser full screen mode and the normal docked mode of the DocumentViewer.
toggleSelection Toggles the line text selection functionality of the DocumentViewer.
toggleSidebar Toggles the display of the document thumbnail sidebar of the DocumentViewer.
toggleToolbar Toggles the display of the undocked toolbar of the DocumentViewer.
validate Validates the form fields and returns true, in case all required fields are completed and false, in case fields are missing.


Property Description
annotations Provides functionalities for working with Annotations.

Further Reading

Learn more about the Javascript: TXDocumentViewer Object in the Text Control Blog: