How can I randomize the position/rotation of a stamp on PDF using Javascript
Hello!
I have a PDF to which I need to apply a stamp on every page, but I would like to add some kind of variation (like it was applied manually).
What should I add to this code in order to add a small randomize number to the initial position and rotation of the stamp?
The current code:
this.syncAnnotScan();
var annt = this.getAnnots(this.pageNum)[0];
var props = annt.getProps();
for(var i=0;i < this.numPages;i++){
props.page = i;
if(i != this.pageNum)
this.addAnnot(props);
}
Thank you.
Later edit: I think I didn’t choose the right section to post my question. Sorry.