Page 1 of 1

About the usage of GetAnnotPropertiesValues in javascript API

Posted: Thu Oct 25, 2018 6:02 am
by kelvinn
I am trying to get the (left, top, height, and width) properties from a newly created rectangle annotation object. As far as my understanding, the GetAnnotPropertiesValues method is the best way to do that. I followed the instruction here: https://www.docuvieware.com/guides/aspn ... alues.html
Below is the function I made:
function getAnnotationValue() {
var result = DocuViewareAPI.GetAnnotPropertiesValues("DocuVieware1", 1);
if (result == 1)// 1 if error
{
alert("error");
}
else {
alert(result);
}
}
I build it and yet nothing happens, not even an error alert. And even I try some testing code e.g. (alert ("hello")) at the end of the function it still shows nothing. Please suggest a correct method for the implementation of this method if I am wrong. Thank you.

Re: About the usage of GetAnnotPropertiesValues in javascript API

Posted: Tue Nov 06, 2018 5:29 am
by kelvinn
Any sign of solution?

Re: About the usage of GetAnnotPropertiesValues in javascript API

Posted: Mon Jan 14, 2019 6:18 pm
by Loïc
Hello Kelvin,

Sorry for the delayed answer.

I've tested your code, it works fine, at least with our latest release. You should try to update.

Also I think you may want to replace:

alert(result); <- this line should display [object]

by

alert(JSON.stringify(result));

Please let us know if your problem persists.

With best regards,

Loïc Carrère