I have a simple code that adds a freetext annotation to each page on a pdf, the content of the annotations is according to the title.
I run this code on the javascript debbuger inside the pdf, I would like a code to run this code in each pdf in a folder
also for some reason the line "textSize: 26" does not work, It just put the last size used
var myname = this.documentFileName
var pos = myname.search("UNIT")
var UnitNum = myname.slice(pos+5,pos+9)
var currentpage = this.pageNum
var AllPages = this.numPages
for(var i=0; i<AllPages; i++){
this.addAnnot({
page: i,
type: "FreeText",
contents: UnitNum,
rect: [50,690,70,765],
Print: true,
fillColor: color.transparent,
strokeColor: color.white,
textFont: font.Helv,
textSize: 26,
})
;
}