Modify security settings

The security operation element can be used to encrypt and decrypt documents.

 

encrypt operation

 

These parameters can be used to set encryption for a PDF document.

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<operation xmlns="http://schema.webpdf.de/1.0/operation">
<security>
  <encrypt canAssemble="true"
  canExtractContent="true"
  canExtractForAccessibility="true"
  canFillInForm="true"
  canModify="true"
  canModifyAnnotations="true"
  canPrint="true"
  canPrintHighRes="true">
    <password open=""
              permission=""
              encryptionKey="AES_128"/>
  </encrypt>
</security>
</operation>

{
"security": {
  "encrypt":{
    "canAssemble":true,
    "canExtractForAccessibility":true,
    "canFillInForm":true,
    "canModify":true,
    "canModifyAnnotations":true,
    "canPrint":true,
    "canPrintHighRes":true,
    "password":{
      "open":"",
      "permission":"",
      "encryptionKey":"AES_128"
     }
   }
 }
}

 

 

encrypt-Element

 

<encrypt canAssemble="true"
  canExtractContent="true"
  canExtractForAccessibility="true"
  canFillInForm="true"
  canModify="true"
  canModifyAnnotations="true"
  canPrint="true"
  canPrintHighRes="true">
    ...
</encrypt>

"encrypt":{
"canAssemble":true,
"canExtractForAccessibility":true,
"canFillInForm":true,
"canModify":true,
"canModifyAnnotations":true,
"canPrint":true,
"canPrintHighRes":true,
...
}

 

canAssemble (default: false)

If "true," the document can be rearranged (e.g., pages can be deleted, inserted, and rotated).

 

canExtractContent (default: false)

If "true," content can be extracted (copied) from the document.

 

canExtractForAccessibility (default: false)

If "true," content can be extracted (copied) for accessibility purposes.

 

canFillInForm (default: false)

If "true," form fields can be filled out and the document can be signed.

 

canModify (default: false)

If "true," changes to the document are permitted.

 

canModifyAnnotations (default: false)

If "true," comments can be added to the document and deleted from the document.

 

canPrint (default: false)

If "true," the document can be printed.

 

canPrintHighRes (default: false)

If "true," the document can be printed at high resolution levels.

 

 

password element

 

Used to set the password for encryption and the encryption key length.

 

<password open=""
        permission=""
        encryptionKey="AES_128"/>

"password":{
  "open":"",
  "permission":"",
  "encryptionKey":"AES_128"
}

 

encryptionKey (default: "RC4_128")

Sets the encryption level for the document.

RC4_40 = 40-bit RC4

RC4_128 = 128-bit RC4

AES_128 = 128-bit AES

AES_256 = 256-bit AES

 

Please note that the option “256-bit AES” only works if the "Java Cryptography Extension (JCE)" has been enabled with "Unlimited Strength" in the JVM. You can obtain the modified "Policy Files" (along with instructions for installation) from the Oracle website:

 

Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 Download:

http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

 

open (default: "")

Used to set the password that will be requested if the PDF document is opened for reading.

 

permission (default: "")

Used to set the password that will be requested if the file is opened for editing (e.g., when removing pages). The password is required to enable the individual access permissions and must not be blank if the access permissions are to be used.

 

hint

Please note that the password and the associated access permissions will only provide protection if an appropriate display program for PDF documents takes these settings into account.

 

 

decrypt operation

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<operation xmlns="http://schema.webpdf.de/1.0/operation">
<password permission=""/>
<security>
  <decrypt/>
</security>
</operation>

{
"password": {
  "permission": ""
 },
"security": {
  "decrypt": {}
 }
}

 

 

decrypt element

 

The document will be decrypted when the decrypt element and the required password element are used.

 

<decrypt/>

"decrypt": {}

 

 

password element

 

Used to set the password (please refer to "Passwords") required in order to modify the PDF document.

 

<password permission=""/>

{
"password": {
  "permission": ""
 },