How to run a script after password security added to pdf
I have a document which is placed on the company intranet (it needs to be password protected), if a copy is downloaded, the next time it is opened a watermark will show on each page.
The script is placed as an action on the page open event.
this.addWatermarkFromText("Uncontrolled document", 0, font.Helv, 24, color.red);
This script works however once the pdf is password protected it will no longer run the script.
NotAllowedError: Security settings prevent access to this property or method.
Doc.addWatermarkFromText:1:Page undefined:Open
Can anyone please advise how an embedded javascript can run after the document is password protected?
Thanks
