A locked PDF is unlocked to allow editing and then locked again after the edits are completed

Create Secure Document Workflows with PDF Password Protection

Leverage Encrypt PDF and Restrict PDF API Tools to Automate Document Security by Applying and Removing SHA-256 Encryption and Permission Restrictions
Share this page

The universal compatibility and easy distribution of PDF files has been a boon for business productivity for over three decades, but with these advantages come serious considerations for developers. Document security is tantamount to corporate security, and pdfRest has all of the tools your applications need to automate secure document workflows.

There are two main tools in the pdfRest API Toolkit to manage document security — Encrypt PDF and Restrict PDF. Both of these tools are two-way roads; Encrypt PDF both encrypts and decrypts, Restrict PDF both restricts access to features and opens them back up. Combining these two tools enables document owners to both narrow and widen the intended audience for their documents.

For example, the A Public Relations firm is working on a press release for a customer's new product. Their content management system has been configured to integrate with pdfRest so that any time someone from the design team pulls a PDF document related to this product, it first uses the Encrypt PDF tool to decrypt the AES 256 hash on the file then uses the Restrict PDF tool to unlock permissions so the file can be edited and modified. After the work is finished, the document is checked back into system where the Encrypt and Restrict PDF API tools re-apply security measures, creating an encryption-at-rest secure storage solution and preventing unauthorized users from viewing, editing, printing, and copying text. The document, and the PR firm's reputation, are secured for the launch of the customer's new product.

This entire workflow can be automated with the capabilities of the pdfRest API Toolkit. Feel free to try the tools for yourself with our interactive API Lab!

Encrypt Code Example   |   Load this into API Lab↗

    curl -X POST "https://api.pdfrest.com/encrypted-pdf" \ 
        -H "Accept: application/json" \ 
        -H "Content-Type: multipart/form-data" \
        -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
        -F "file=@PATH_TO_FILE/pdfrest.pdf" \ 
        -F "output=pdfrest_encrypted" \ 
        -F "new_open_password=gy$djKDnc28&7khDH!" \


Restrict Code Example   |   Load this into API Lab↗

    curl -X POST "https://api.pdfrest.com/restricted-pdf" \ 
        -H "Accept: application/json" \ 
        -H "Content-Type: multipart/form-data" \
        -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
        -F "file=@PATH_TO_FILE/pdfrest_encrypted.pdf" \ 
        -F "output=pdfrest_encrypted_restricted" \ 
        -F "new_permissions_password=lcl?bvdUG9895%dh#4" \ 
        -F "restrictions[]=edit_annotations" \ 
        -F "restrictions[]=edit_content" \ 
        -F "restrictions[]=copy_content" \ 
        -F "current_open_password=gy$djKDnc28&7khDH!" \
        

Decrypt Code Example   |   Load this into API Lab↗

    curl -X POST "https://api.pdfrest.com/decrypted-pdf" \ 
        -H "Accept: application/json" \ 
        -H "Content-Type: multipart/form-data" \
        -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
        -F "file=@PATH_TO_FILE/pdfrest_encrypted_restricted.pdf" \ 
        -F "output=pdfrest_decrypted_restricted" \ 
        -F "current_open_password=gy$djKDnc28&7khDH!" \ 
        -F "current_permissions_password=lcl?bvdUG9895%dh#4" \
        

Unrestrict Code Example   |   Load this into API Lab↗

    curl -X POST "https://api.pdfrest.com/unrestricted-pdf" \ 
        -H "Accept: application/json" \ 
        -H "Content-Type: multipart/form-data" \
        -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
        -F "file=@PATH_TO_FILE/pdfrest_decrypted_restricted.pdf" \ 
        -F "output=pdfRest_decrypted_unrestricted" \ 
        -F "current_permissions_password=lcl?bvdUG9895%dh#4" \    
        




Encrypt PDF



Restrict PDF


Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.

Compare Plans
Contact Us