Copy link to clipboard
Copied
Hi. I am a beginner in the JavaScript SDK of Acrobat.
I would like to change the size of the 3D annot but it seems the following piece of code is not working.
var pageIndex = this.pageNum;
var annotIndex = 0;
var aMy3DAnnots = this.getAnnots3D(pageIndex);
var RectArray = aMy3DAnnots[annotIndex].rect;
RectArray = [48, 200, 300, 193];
For fields, I have a similar piece of code and it works.
aObj = this.getAnnots({nPage:0});
aObj[0].rect = [48,100,300,193];
Is there anything that I am doing wrong?
Thank you very much for your guidance. Acrobat SDK​@ !
1 Correct answer
The same applies for a RichMedia Annotation, by the way. The rect property is supposedly R/W, but changing its value doesn't affect the actual annotation.
Copy link to clipboard
Copied
Your code does nothing. It copies a rectangle to RectArray and changes the copy. You do nothing to affect the annotation, which the other example does do. (I know nothing about 3D annotations so I don’t know if there is a solution)
Copy link to clipboard
Copied
HI,
Although the property is marked as read/write in the documentation, changing it appears to have no effect on the 3D annot itself, where as changing it for a rect annotation, has the required effect.
This looks like either a bug in the documentation, the property should be read only, or a bug in Acrobat, the rect should be changable but isn't.
I can't think of any other way of changing the location using scripting.
We could probably create a plugin using the Acrobat SDK that would be able to move the annotation, not sure if that would be an option, but wanted to include for your information
Regards
Malcolm
Copy link to clipboard
Copied
So it seems like it a flaw in the documentation.
Will someone fix the documentation as soon as possible so other users who are reading the SDK documentation don't have the same issue in the future?
Creating plugin won't be an option.
Copy link to clipboard
Copied
Hi,
Well we don't know if it is issue with the documentation or with Acrobat JavaScript, it could be supposed to work and not.
There doesn't appear to be a way to log a bug against the Acrobat SDK, the form for feature request/bugs only has the main products listed. Feature Request/Bug Report Form
Regards
Malcolm
Copy link to clipboard
Copied
The same applies for a RichMedia Annotation, by the way. The rect property is supposedly R/W, but changing its value doesn't affect the actual annotation.
Copy link to clipboard
Copied
Nobody seems to be updating the SDK documentation any more.

