Page 1 of 1

JavaScript

Posted: Tue Feb 22, 2011 9:58 am
by agaetano
Hello,

i need a javascript reference manual to work with FullSwitch. For example now i would like to create a flow that add a WaterMark using a precise rules, i tested this example but don't work.



doc.addWatermarkFromFile({

cDIPath: "c:Tacca.pdf",

nSourcePage: 1,

nEnd: 5,

nHorizAlign: 0,

nVertAlign: 0,

nHorizValue: 0,

nVertValue: 0,

nRotation: 0

});

JavaScript

Posted: Tue Feb 22, 2011 5:00 pm
by dkelly
Hello, what tool did you want to use to perform the watermarking? Acrobat, Apago, callas, Enfocus, etc?



Based on the function name in your original question I assume you want to use Acrobat Javascript API.

JavaScript

Posted: Tue Feb 22, 2011 6:14 pm
by agaetano
Yes i would like to use Acrobat JavaScript, i need to write a script to use in Save option in Acrobat module. I must to use Watermark only in specified pages for example in 1, 5, 9 , ecc.

do you know another solution?

JavaScript

Posted: Tue Feb 22, 2011 9:43 pm
by dkelly
So the Javascript for Acrobat Professional would be something like:





if ($error == null) {

try {

$doc.addWatermarkFromFile({

cDIPath: "c:Tacca.pdf",

nSourcePage: 1,

nEnd: 5,

nHorizAlign: 0,

nVertAlign: 0,

nHorizValue: 0,

nVertValue: 0,

nRotation: 0 });

}

catch(theError) {

$error = theError;

$doc.closeDoc( {bNoSave : true} );

}

}