Prizm Content Connect
Methods/Functions

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.
loadAnnotationsFile

Takes a file name and loads the XML stream from the file.

For example:

var app = document.getElementById("ViewerEnterpriseAnnotation");
app.loadAnnotationsFile("annotations.xml");

This will cause the Flash viewer to search for and open an annotations file called "annotations.xml" in the root of the Markups folder.

loadDocument

Takes a document file name and loads it into the viewer, replacing any active document with the new one.

Note: Works with Proxy-Server only. This feature is not supported in PCCIS.

Showing an Alert Box in Viewer

alert(“text to be shown in alert box”)

Example
Copy Code
<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
Copy Code
<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
Copy Code
<a href=javascript: ViewerEnterprise.assignHighlightColor (0xFFFF00)>Set Color</a>

Passing Highlights XML to Viewer through JavaScript

loadHighlights(XML_TO_ADD)
clearHighlights()

Example
Copy Code
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();

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback