In This Topic
Reference Guides / JavaScript API / Annotations / GetPageAnnotId

GetPageAnnotId

In This Topic
 GetPageAnnotId

This function allows you to obtain a specific annotation identifier from its index.

GetPageAnnotId: function (docuViewareID, pageNo annotIdx)

Parameters

docuViewareID
The identifier of a DocuVieware™ instance.
pageNo
An integer specifying a page number.                
annotIdx
An integer specifying the index (0-based) of an annotation.  
              

Return Value

           
1 if error, a string specifying the annotation identifier if success.               

Example of usage

Retrieving all annotation identifiers located on the first page of the loaded document:

var pageNo = 1;
var annotCount = DocuViewareAPI.GetPageAnnotCount("DocuVieware1", pageNo);
for (var annotIdx = 0; annotIdx < annotCount; annotIdx++) {
   console.log(DocuViewareAPI.GetPageAnnotId("DocuVieware1", pageNo, annotIdx));
}