Closed SkyEngine-OSP closed 5 years ago
@SkyEngine-OSP Your script has some problems, that I have just fixed and I am sharing here for reference:
var watermark_action = actions.create("pdf-watermark");
watermark_action.parameters["inplace"] = true;
watermark_action.parameters["destination-folder"] = document.parent;
watermark_action.parameters["watermark-type"] = "text";
watermark_action.parameters["watermark-text"] = "Lorem Ipsum";
// wrong parameter
//watermark_action.parameters["watermark-pages"] = "all";
watermark_action.parameters["page"] = "all";
watermark_action.parameters["watermark-depth"] = "over";
// missing parameters
watermark_action.parameters["watermark-font"] = "Courier";
watermark_action.parameters["watermark-size"] = "10";
// END missing parameters
watermark_action.parameters["position"] = "center";
watermark_action.execute(document);
And as this is not an issue with the addon, I am closing it.
i can't seem to configure PDF-Toolkit to run on a Folder-Level Rule via Javascript.
my goal is to: whenever a Document (PDF) is uploaded to the space (or folder), it would automatically watermarked by using PDF-Toolkit, replacing the original file of course.
below is my code snippet, please tell me if i have a missing or wrong code. else, this might be an issue.
i am receiving a