Hi Experts,
I am trying to add color watermark with JavaScript in acrobat. Please teach me with a little description how can I automatically add a color watermark with JavaScript in acrobat.
Thanks
How to add color watermark with JavaScript in acrobat.
Watermark added to the PDF like you want it to be when you run the "addWatermarkFromFile()" code in the console window?
Once that works you are ready to create your trusted function. Add this code to a folder level JavaScript file
myWatermark = app.trustedFunction( function (oDoc)
{
app.beginPriv(); // Explicitly raise privilege
oDoc.addWatermarkFromFile({cDIPath: "C:/Users/Public/Desktop/HI-shortcuts/HIPS-stamp.pdf"});
app.endPriv();
}) ;
You'll find info on folder level scripts here:
https://acrobatusers.com/tutorials/folder_level_scripts
Next you'll need to call this function from the Keystroke script on the combobox.
if(this.willCommit)
myWatermark(this);
Â
Regards
Rozack Susan
Â