Copy link to clipboard
Copied
I wanted to protect PDF files from unauthorized viewing and printing, modifying and copying, saving and sharing, printing to file.
Is this possible via scripting
Copy link to clipboard
Copied
Yes, but it's much easier to do it manually, via File - Properties - Security.
If you really want to use a script you'll need to study the reference of the encryptUsingPolicy method of the Document object.
Copy link to clipboard
Copied
"unauthorized viewing and printing, modifying and copying, printing to file."
"Possible" using password or certificate encryption in Acrobat, but apart from the document open password, everything else is just a suggestion to the viewing application. Adobe says it will respect the suggestion, other vendors do not. So if your PDF is opened in something else, it'll be fully printable/editable/copyable.
"unauthorized saving and sharing"
Completely impossible. PDFs do not stream, they cannot be opened by anyone until after they have been saved. Nothing inside the file can prevent people from saving copies and sharing them, all you can hope is that they don't also tell people the password. You can only control who has access to the contents of a PDF if you secure it with digital rights management (a massively expensive LiveCycle Enterprise service).