PDF with Password
Hello Everyone,
I have a question, someone know how to put a password in a pdf file? Or in a pdf base64?
Best regards, Flávio.
Comments
Do you need the eventual user to be prompted for a password when opening the PDF? If so, you'll need to push it through an external application/utility (under IRIS/Cache control) that supports command-line password protection for the output file.
If you just need to encrypt the file for delivery but don't need the user to be prompted for a password when opening the document, there are a number of encryption options in the %SYSTEM.Encryption class.
I need the prompt for the user.
You can use pdfbox which is already used by ZEN for some pdf conversions. To make a pdf require a password, just run this command with $ZF(-100):
java -cp /opt/cachesys/fop/lib/pdfbox-app-1_7_1.jar org.apache.pdfbox.Encrypt -U 12345 /arquivos/file.pdf