Restrict PDF

POST https://api.pdfrest.com/restricted-pdf

Apply security restrictions to a PDF using a permissions password.

At minimum, a permissions password prevents the unauthorized modification of security settings in a PDF, including the application or removal of encryption.

Required form-data body parameters:

  • One of:
    • file - File to be uploaded and processed
    • id - Alphanumeric ID (UUID) of existing file on server to be processed
  • new_permissions_password - A new permissions password for the input document. Passwords must be 6-128 characters long.
  • current_permissions_password - Required if there is already a permissions password on the document. The current password will be replaced by the value of new_permissions_password.
  • current_open_password - Required if the input document is encrypted.

Optional form-data body parameters:

  • output - File name for the output file (without extension)
  • restrictions[] - An additional restriction to apply to the document. Select from any of the following (add a restrictions[] param for each additional restriction):
    • printlow_ (forbids all printing)
    • printhigh_ (forbids high-quality printing)
    • editdocumentassembly
    • editfillandsignformfields_
    • editannotations_
    • editcontent_
    • copycontent_
    • accessibilityoff_

Request Body

[{"name"=>"file", "value"=>nil, "datatype"=>"null"}, {"name"=>"id", "value"=>"xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "datatype"=>"string"}, {"name"=>"output", "value"=>"pdfrest_restricted_pdf", "datatype"=>"string"}, {"name"=>"new_permissions_password", "value"=>"new_example_pw", "datatype"=>"string"}, {"name"=>"current_permissions_password", "value"=>"old_example_pw", "datatype"=>"string"}, {"name"=>"restrictions[]", "value"=>"print_low", "datatype"=>"string"}, {"name"=>"current_open_password", "value"=>"example_pw", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Api-Keystring