Dynamic watermarking with Javascript
I am trying to create a Javascript string that can apply a watermark based on user input. I need it to say something along the lines of "this document is licensed to ____. Cannot be reproduced/resold, etc." It needs to appear on every page and I would like to avoid it asking every time the document is opened. I have never worked with Javascript, but I have been able to come close to a solution by following various tutorials. Unfortunately, none of them are quite right. I am still missing how to add static text around the dynamic name. Below is what I have so far, any help would be greatly appreciated!
var dialogTitle = "Purchaser Name";
var PurchaserName = app.response("Please enter your name",
dialogTitle);
event.target.addWatermarkFromText({
cText: PurchaserName,
nTextAlign:app.constants.align.center,
cFont: "Arial",
nRotation: 0,
nScale: -1,
nOpacity: 0.06,
nFontSize: 5
});
