Calling Viewer Methods
Method |
Details |
alert |
Show an alert box in the viewer with a message |
assignHighlightColor |
Assign a color through javascript for text selection |
loadHighlights |
Passing Highlights XML to Viewer through JavaScript |
clearHighlights |
Clear loaded highlights XML |
gotoPage(pageNumber ) |
Load a particular page in the viewer |
getMarksXML | Retrieves the XML string that describes all annotations in the document. |
Showing an Alert Box in Viewer
alert(“text to be shown in alert box”)
Example | ![]() |
---|---|
<a href=javascript: ViewerEnterprise.alert(“text to be shown in alert box”)>Show Alert</a>
|
Calling Viewer Methods
Method |
Details |
alert |
Show an alert box in the viewer with a message |
assignHighlightColor |
Assign a color through javascript for text selection |
loadHighlights |
Passing Highlights XML to Viewer through JavaScript |
clearHighlights |
Clear loaded highlights XML |
loadAnnotations |
Passing Annotations XML to Viewer through JavaScript |
removeAnnotations |
Clear loaded annotations XML |
saveAnnotations |
Save loaded annotation Save loaded annotation |
getMarksXML | Retrieves the XML string that describes all annotations in the document. |
Showing an Alert Box in Viewer
alert(“text to be shown in alert box”)
Example | ![]() |
---|---|
<a href=javascript: ViewerEnterprise.alert(“text to be shown in alert box”)>Show Alert</a>
|
Assigning Text Selection Color via JavaScript
assignHighlightColor(hexcode of color)
Example | ![]() |
---|---|
<a href=javascript: ViewerEnterprise.assignHighlightColor (0xFFFF00)>Set Color</a> |
Passing Highlights XML to Viewer through JavaScript
loadHighlights(XML_TO_ADD)
clearHighlights()
Example | ![]() |
---|---|
ViewerEnterprise.loadHighlights( "<root><actions><action type='addHighlight'> <highlight documentname='PowerCfg.odt' id='AE40B90F8A971CF262C3090970DEC151' userid='' tooltip='' mode='ByText' occurance='1' page='0' allowDelete='true' color='16776960' start='0' end='0' annotation='0'><![CDATA[paper]]></highlight></action></actions></root>" );
ViewerEnterprise.clearHighlights();
|