CIB pdf toolbox technical guide (EN)

7. Passwords and encryption with PDFs

7.2. Properties for password protection and encryption

Property description

Type

Functionality

Kind

AllowPdfPermissions

(from CIB pdf toolbox 1.8.3 onwards)

String

The property can be used to decide if the editing rights set in the PDF via the owner password are taken into account during processing.

 

Attention:

Any user password assigned in the PDF must be set, otherwise no processing will take place.

The generated output PDF is not encrypted.

1          Rights will be ignored

0          Rights will be taken into account

          (default)

 

This property must be set to the value "1" when converting a PDF/A file protected with an owner password. Otherwise it will result in an error.

Set

EncryptDocumentPassword

(from CIB pdf toolbox 1.18.0 onwards)

String

This property can be used to pass the password for a password-protected document without specifying whether it is an EncryptUserPassword or EncryptOwnerPassword.

The syntax is identical to that of these two properties.

If the EncryptDocumentPassword is set, the CIB pdf toolbox will detect which password is used (User or Owner).

For the feedback of this information the PDFPERMISSION (= SECURITYINFO) metadata has been extended by the flag IsOwnerAccess:
1          Owner-Passwort
0          User-Passwort

Attention:
The SECURITYINFO metadata will only be set for encrypted documents. If they are not available, the document is unprotected.

Set

EncryptOwnerPassword

String

Owner password of the input file(s) or BackgroundFilename.

The passwords have to be listed in exactly the same order as the corresponding files within the InputFilename /BackgroundFilename (separated by ; symbol).

The password itself cannot contain the ; symbol.

Set

EncryptUserPassword

String

User password of the input file(s) or BackgroundFilename.

The passwords have to be listed in exactly the same order as the corresponding files within the InputFilename /BackgroundFilename (separated by ; symbol).

The password itself cannot contain ; symbol.

Set

OutputOwnerPassword

String

Assigns new owner password for the output file.

The password itself cannot contain ; symbol.

Set

OutputUserPassword

String

Assigns a new user password for the output file.

The password itself cannot contain ; symbol.

Set

PdfUserPasswordPresent
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values:

„“ or „0“ = no user password available

“1” = user password available

Get

PdfOwnerPasswordPresent
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values:

„“ or „0“ = no owner password available

“1” = owner password available

Get

PdfVersion

String

Setting the PDF version to be generated.

Valid values:

“1.3”                Acrobat family 4

“1.4”                Acrobat family 5 (default)

“1.5”                Acrobat family 6

“1.6”                Acrobat family 7

„1.7“                Acrobat family 8

From CIB pdf toolbox Version 1.4.109 onwards:
“1.7EL3“          
Acrobat family 8
(Acrobat Reader version 9 or higher          is required to open it!)

Hint:
When encryption is enabled, the following encryption algorithms are used:
”1.3”                RC4-40, Revision 2
”1.4”                RC4-128, Revision 3
”1.5”                RC4-128, Revision 4
from “1.6”        AES-128, Revision 4
from „1.7EL3“ AES-256, Revision 5

Get/
Set

EncryptMetadata

(from CIB pdf toolbox 1.4.109 onwards)

String

By setting this property, the user can decide if the metadata will be encrypted in the PDF. Metadata is general information about the PDF, such as author, creation date, and so on. The format and content of the metadata is not fixed and depends on the tool that created the PDF.

Possible values:
„0“       No metadata encryption
„1“       Metadaten encryption
            (default)

Hint:
PDF version of at least 1.5 is required to process this property.

Get/
Set

The settings of the following Encryptxxx properties (permissions) are generally transferred to the output document with the password from the input. See chapter "How does the CIB pdf toolbox behave with password protection?

For unencrypted input, all switches in the output are set TRUE.

If a new password (OutputOwnerPassword, OutputUserPassword) is assigned to the output document, the permissions can be reassigned by setting the following Encryptxxx properties.

EncryptEnableAssembling

String

Approve document assembly for the output file.

Possible values:
“1“ or „TRUE“   approved
“0“ or „FALSE“  not approved  

Set

EncryptEnableClipboard

String

Approve content copying for the output file.

Possible values:
“1“ or „TRUE“   approved
“0“ or „FALSE“  not approved 

Set

EncryptEnableExtract

String

Screen reader programs (e.g. for the visually impaired) can access the content. The user is not allowed to copy text and graphics from the PDF file if this value is set.

Possible values:

„0“       No permission (default)

„1“       Action permitted

Set

EncryptEnableForms

String

Approve completion of form fields for the output file.

Possible values:
“1“ or „TRUE“   approved
“0“ or „FALSE“  not approved 

Set

EncryptEnableModifying

String

The user may modify the PDF file (add text etc.) if this value is set.

Possible values:

„0“       No permission (default)

„1“       Action permitted

Set

EncryptEnableNotes

String

The user may add text notes and AcroForm fields to the PDF file and modify existing ones if this value is set.

Possible values:

„0“       No permission (default)

„1“       Action permitted

Set

EncryptEnablePrinting

String

Approve printing for the output file.

Possible values:
“1“ or „TRUE“   approved
“0“ or „FALSE“  not approved 

Set

PdfEncryptionLevel
(from CIB pdf toolbox 1.4.78 onwards)

String

Returns the encryption depth, which is greater or equal to 40 and always a multiple of 8.

Get

PdfEncryptionAlgorithm
(from CIB pdf toolbox 1.4.78 onwards)

String

Returns the value of the encryption algorithm.

„0“ = undocumented algorithm

„1“ = PDF encryption 40 bit (RC4-40)

„2“ = PDF encryption, 40 bit oder higher (RC4-128)

„3“ = undocumented algorithm

From CIB pdf toolbox 1.4.107 onwards:

„4“ = AES-128

From CIB pdf toolbox 1.4.109 onwards:

„5“ = AES-256


User-defined encryption is possible for cases "4" and "5". This refers to the feature "Metadata unencrypted" offered by Adobe Acrobat.

Get

PdfPermissionAssemble
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

„“ = swap pages, create bookmarks and thumbnails allowed

„NotAllowed” = swap pages, create bookmarks and thumbnails not allowed

Get

PdfPermissionContentAccess
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

„“ = cutting text and graphics is allowed

„NotAllowed” = cutting text and graphics is not allowed

Get

PdfPermissionCopy
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

„“ = copying text and graphics is allowed

„NotAllowed” = copying text and graphics is not allowed

Get

PdfPermissionFillFormFields
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

 „“ = filling in form fields, including signature fields, is allowed

„NotAllowed“ = filling in form fields, including signature fields, is not allowed

Get

PdfPermissionModify

(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

„“ = modification is allowed (bit 3 is set or document is not encrypted)

„NotAllowed“ = modification is not allowed (bit 3 is not set)

Get

PdfPermissionModifyAnnotations

(from CIB pdf toolbox 1.4.78 onwards)

String

add or modify text annotations and (if modify permission is true) form fields

Possible values are:

„“ = Modification of annotations is allowed (bit 5 is set or document is not encrypted)

„NotAllowed“ = Modification of annotations is not  allowed
(bit 5 is not set)

Get

PdfPermissionPrint
(from CIB pdf toolbox 1.4.78 onwards)

String

Possible values are:

„“ = Printing allowed

„NotAllowed“ = Printing not allowed

„Low Resolution“ = Printing only in low resolution allowed

Get

PdfPermissions

String

Bit field as decimal number, permitted access types without master password

Get