Skip to main content

Encrypt a document

On the 1.1 build, request processing.protection for a PDF. The worker uses qpdf with AES-256 encryption. Set a distinct user password when recipients must enter a password to open the document. Keep the owner password private. Run this example on your server with the API origin, workspace key and two passwords supplied by your secret manager. It prints the job ID.

Check the recipient experience

Poll the job, download its file and open it in a new PDF reader session. Verify that the user password unlocks the statement. If you omit the user password, a reader can open the file without one. Print, copy and modification flags depend on the reader honoring them. Keep passwords out of logs and share the opening password separately from the document.