JavaScript

Post Reply
agaetano
Newbie
Posts: 2
Joined: Thu Jan 13, 2011 3:40 pm

JavaScript

Post 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

});
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

JavaScript

Post 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.
agaetano
Newbie
Posts: 2
Joined: Thu Jan 13, 2011 3:40 pm

JavaScript

Post 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?
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

JavaScript

Post 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} );

}

}


Post Reply