No problem , take your time , I'll wait you
Is these 4 lines I test them alone ? or put them in the first script you attached ? or How ?
when I tested them alone this message apears : ReferenceError: theFile is not defined
1:Console:Exec
undefined
In fact that was not too long.
Forget my "86x55_BB.pdf" file and only open your "Test.pdf" file, then run this script from the console window.
//
var largeur=86;
var hauteur=55;
var offsetH=-16.5;
var deltaH=91;
var offsetV=31;
var deltaV=60;
//
var mm2pt=72/25.4;
var nbPages=this.numPages;
for (var p=0; p<nbPages; p++) {
for (v=0; v<4; v++) {
for (h=0; h<2; h++) {
this.newPage({
nWidth: largeur*mm2pt,
nHeight: hauteur*mm2pt
});
this.addWatermarkFromFile({
cDIPath: this.path,
nSourcePage: p,
nStart: this.numPages-1,
nHorizAlign: app.constants.align.left,
nVertAlign: app.constants.align.top,
nHorizValue: (offsetH-h*deltaH)*mm2pt,
nVertValue: (offsetV+v*deltaV)*mm2pt
});
}
}
}
this.deletePages(0,nbPages-1);
this.saveAs(this.path.replace(/.pdf$/i," \(One Image Per Page\).pdf"));
Is that working fine? Let me know.
@+