Content Management and Capture

 View Only
Expand all | Collapse all

DAEJA API: HOW TO ADD ANNOTATIONS IN VIEWER PROGRAMATICALLY USING JAVASCRIPT API

  • 1.  DAEJA API: HOW TO ADD ANNOTATIONS IN VIEWER PROGRAMATICALLY USING JAVASCRIPT API

    Posted Wed August 30, 2023 10:47 AM
    Hi Guys,
     
    I am new to Deaja api. I want to add dynamic annotations programmatically in the viewer using java script api. I understood that need to create plugin for the same. I have tried below code in plug-in js file. 
    require(["dojo/_base/declare",
             "dojo/_base/lang"], 
    function(declare, lang) {
    	alert('here');		
    	ViewONE.addAnnotation("[TEXT]<P>X=300<P>Y=350<P>TEXT = This is line 1<N>This is line 2<P>FONTHEIGHT = 34<P>PAGE=1<P>EDIT = 1<P>FILLCOLOR = 255, 255, 0<P>ROTATION = 0<P>TEXTROTATION = 90<P>TRANSPARENT = 0<P>SEMITRANSPARENT = 0<P>");
    });

    Getting the following error "ViewONE is not defined". I have searched in navigator web application for the ViewONE js file. But could not find. Please let me know if the above approach correct?
    Please let me know the sequence of steps to achieve this requirement. It would be nice if you can provide some sample code.
     



    ------------------------------
    RAVI KUMAR
    ------------------------------


  • 2.  RE: DAEJA API: HOW TO ADD ANNOTATIONS IN VIEWER PROGRAMATICALLY USING JAVASCRIPT API

    Posted Fri September 01, 2023 03:31 AM

    take a look in the documentation perhaps it helps:

    Configuring the virtual viewer Client by using JavaScript

    and this  comment here: https://stackoverflow.com/questions/53777440/how-to-load-configure-ibm-daeja-viewone-in-html



    ------------------------------
    dorothea
    dorotheavulcan@yahoo.com
    ------------------------------



  • 3.  RE: DAEJA API: HOW TO ADD ANNOTATIONS IN VIEWER PROGRAMATICALLY USING JAVASCRIPT API

    Posted Mon September 04, 2023 06:30 AM

    Hi Dorothea,

    Thank you. I have gone through the documentation. As per the code, it launches viewer in a custom web application.

    My requirement is, Need to show annotations on the document viewer if the user opens a document in Content Navigator. I understood I need to do this using plugin. But not sure about the exact code.



    ------------------------------
    RAVI KUMAR
    ------------------------------