Thank you very much Rama. I will check.
Original Message:
Sent: Mon September 04, 2023 09:55 AM
From: RAMA LINGAM
Subject: Adding annotations programmatically using the JavaScript api
Here is the sample code for ICN plugin:
https://www.ibm.com/support/pages/using-icn-plugin-customize-daeja-viewone-launch
------------------------------
RAMA LINGAM
Original Message:
Sent: Mon September 04, 2023 06:26 AM
From: RAVI KUMAR
Subject: Adding annotations programmatically using the JavaScript api
Hi Rama,
Thank you. I am not sure why I need to invoke viewone.js. I want to use OOTB viewer. Additionally I want to show annotations on the viewer if the user opens a document.
Usually navigator plugin has independent files for html and java script. May I know is the code provided by you should be put in which file?
------------------------------
RAVI KUMAR
Original Message:
Sent: Fri September 01, 2023 08:25 AM
From: RAMA LINGAM
Subject: Adding annotations programmatically using the JavaScript api
I don't see you are invoke viewone.js at all in your code that you have posted here.
Here is how you initiate viewone.js.
<!DOCTYPE html>
<HTML>
<script type="text/javascript"src="../viewoneHTML/v1files/viewone.js">
</script>
<OBJECT CLASS = "com.ibm.dv.client.Viewer"
ID = "viewone"
WIDTH = "100%"
HEIGHT = "800">
<param name="filename" value="http://localhost:8080/test.pdf">
<param name="annotate" value= "true">
<param name="annotateEdit" value= "true">
</OBJECT>
</HTML>
------------------------------
RAMA LINGAM
Original Message:
Sent: Fri September 01, 2023 07:24 AM
From: RAVI KUMAR
Subject: Adding annotations programmatically using the JavaScript api
Hi Rama,
ok thank you. I have tried below code.
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.
Can you share the working code if you have.
------------------------------
RAVI KUMAR
Original Message:
Sent: Thu August 31, 2023 12:50 PM
From: RAMA LINGAM
Subject: Adding annotations programmatically using the JavaScript api
Hello Ravi, You will ned to add annotations programmatically using custom plugin.
------------------------------
RAMA LINGAM
Original Message:
Sent: Thu August 31, 2023 09:41 AM
From: RAVI KUMAR
Subject: Adding annotations programmatically using the JavaScript api
Hi Rama,
Thank you. My requirement is not to start the viewer using js api. If I open a document in Daeja viewer, it should have dynamic annotations(Like: Case Information). Hence need to add annotations programmatically to the the viewer. Please let me know whether it should be done by Plug-in or any other way?
------------------------------
RAVI KUMAR
Original Message:
Sent: Wed August 30, 2023 12:09 PM
From: RAMA LINGAM
Subject: Adding annotations programmatically using the JavaScript api
You might have to define the exact path for your viewer.
Please review the steps in this link to start the viewer using js api:
https://www.ibm.com/docs/en/daeja-viewone/5.0.x?topic=viewer-configuring-virtual-client-by-using-javascript
https://www.ibm.com/docs/en/daeja-viewone/5.0.x?topic=reference-javascript-api
If you have any further issues, please do create case with IBM Daeja Support.
------------------------------
RAMA LINGAM
Original Message:
Sent: Wed August 30, 2023 06:36 AM
From: RAVI KUMAR
Subject: Adding annotations programmatically using the JavaScript api
Hello Guys,
Can any one help here.
------------------------------
RAVI KUMAR
Original Message:
Sent: Tue August 29, 2023 11:26 AM
From: RAVI KUMAR
Subject: Adding annotations programmatically using the JavaScript api
Hi,
I have a requirement to add annotations programmatically using the JavaScript api. I have tried below using the custom plug-in.
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 help me how to resolve the issue.
------------------------------
RAVI KUMAR
------------------------------