Copy link to clipboard
Copied
Good afternoon to all members.
I am trying to create a vertical line as annotation at the click of a button. The code I am using is the following:
var bhd=this.addAnnot({name:"FR", page:this.pageNum, type:"Line", rect:[10,10,10,100] });
The annotation is created but regardless of the figures entered in the rect array, I always get the same 45 degrees slant line starting from 0,0. What am I doing wrong (or not doing)?
Thanks in advance,
Nikolas
Instead of rect you need to specify the points property, like this:
points: [[10,10],[10,100]]
Copy link to clipboard
Copied
Please post the exact name of the Adobe program you use so a Moderator may move this message to that forum
Copy link to clipboard
Copied
OMG!
Apologies...
Acrobat Pro DC, version 2015.006.30527
Copy link to clipboard
Copied
Instead of rect you need to specify the points property, like this:
points: [[10,10],[10,100]]
Copy link to clipboard
Copied
Thank you very much, worked like a charm!