Constructor
#
new TWViewerPdfApp()
Members
#
id :number
#
options :object
Initial viewer app options.
#
pdfDocument :PDFDocument
#
viewerDiv :HTMLdivElement
The main container for the viewer app.
Methods
#
activateMultiPageView()
Activates the multi-page view mode.
#
activateSinglePageView()
Activates the single-page view mode.
#
disableSelection(val)
Disables the text selection.
Parameters:
Name |
Type |
Description |
val |
boolean
|
|
#
downloadDocument()
Downloads the loaded document.
#
getDocumentName() → {string}
Get currently loaded document name.
#
getPageTextContent(pageIndex) → {string}
Returns the text content of the page.
Parameters:
Name |
Type |
Description |
pageIndex |
number
|
Page index of the page. Numbering starts from 0.
|
Returns:
The text content of the page.
-
Type
-
string
#
gotoPage(num)
Goes to the specified page.
Parameters:
Name |
Type |
Description |
num |
number
|
The page number.
|
#
loadDocumentFromFile(file, password, app)
Loads the document from the specified file.
Parameters:
Name |
Type |
Description |
file |
file
|
The file of the document.
|
password |
string
|
The password of the document.
|
app |
TWViewerPdfApp
|
The application.
|
#
loadDocumentFromUrl(url, password, app)
Loads the document from the specified URL.
Parameters:
Name |
Type |
Description |
url |
string
|
The URL of the document.
|
password |
string
|
The password of the document.
|
app |
TWViewerPdfApp
|
The application.
|
#
nextPage()
#
nextVisited()
Shows next visited page from the history of the visited pages.
#
openDocumentProperties()
Opens the document's properties.
#
openThroughDialog()
Opens a file dialog and loads the selected PDF file.
#
previousPage()
#
prevVisited()
Shows previously visited page from the history of the visited pages.
#
print()
Prints the document by opening a new window.
#
releasePdfDoc()
Releases the loaded document.
#
rotateClockwise()
Rotates the document by 90 degrees clockwise.
#
rotateCounterClockwise()
Rotates the document by 90 degrees counter-clockwise.
#
showDocumentProperties()
Shows the document properties.
#
showError(error)
Parameters:
Name |
Type |
Description |
error |
string
|
The error message.
|
#
showMsg(msg, type)
Parameters:
Name |
Type |
Description |
msg |
string
|
The message to show.
|
type |
string
|
Available values: "info", "error".
|