cancel
Showing results for 
Search instead for 
Did you mean: 

Location watermark - PDF Toolkit

jeremiebal
Confirmed Champ
Confirmed Champ
Hi

I use an action "pdf-watermark" on javascript by the module "PDF-Toolkit".
Ther is some parameters "location-x" and "location-y" to place a watermark Image on your PDF.
But i try and it seems that's not working 😕

The watermark is applied on my PDF but no on the right place.

Someone had used it yet ?


My code :

var watermark_action = actions.create("pdf-watermark");

// Paramètrage de l'action
watermark_action.parameters["destination-folder"] = myDestFolder;
watermark_action.parameters["watermark-type"] = "image";
watermark_action.parameters["watermark-image"] = nodeRefOfImage;
watermark_action.parameters["watermark-pages"] = "last";
watermark_action.parameters["watermark-depth"] = "over";

watermark_action.parameters["position"] = "manual";
watermark_action.parameters["location-x"] = 50;
watermark_action.parameters["location-y"] = 50;

// Exécution de l'action
watermark_action.execute(doc);
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
I have used the PDF toolkit for digital signatures which require X and Y coordinates and it works fine. I would have to look back at this, but I seem to recall that the origin is not where I thought it was, but once I figured that out it worked.

Have you tried several different values for your coordinates? Do you get an error or does the watermark just fail to appear?

Jeff