PDFEncryptionInfo Object (IPDFEncryptionInfo Interface)
This object provides access to encryption parameters of a PDF file. These parameters can be used during export of recognized text to PDF format. These parameters are set via the EncryptionInfo property of PDFExportFeatures object.
Important! Encryption parameters are not used for PDF/A files.
The PDFEncryptionInfo object allows you to do the following:
- set owner and user passwords;
- set the level of encryption;
- enable or disable the following:
- adding or modifying text annotations and interactive form fields;
- assembling the document: inserting, rotating, or deleting pages and creating navigation elements such as bookmarks or thumbnail images;
- copying or otherwise extracting text and graphics from the document;
- filling out forms (that is, filling out existing interactive form fields) and signing the document (which amounts to filling out existing signature fields, a type of interactive form field);
- modifying the contents of the document;
- printing the document.
Properties
Name | Type | Description |
---|---|---|
Application | Engine, read-only | Returns the Engine object. |
Main settings | ||
IsEncryptionRequested | VARIANT_BOOL |
Specifies whether the PDF file must be encrypted. Important! If this property is set to FALSE, the other properties will be ignored. This parameter can be set to TRUE only if the IPDFExportParams::PDFAComplianceMode is set to PCM_None. This property is FALSE by default. |
EncryptionAlgorithm | PDFEncryptionAlgorithmEnum |
Specifies the PDF encryption algorithm. Note that most encryption algorithms have minimum requirements for the PDF version (IPDFExportFeatures::PDFVersion). See the PDFEncryptionAlgorithmEnum description for details. This property is PDFEA_RC4 by default. |
KeyLength | PDFKeyLengthEnum |
Sets the encryption key length for the RC4 algorithm. This property is used only when the EncryptionAlgorithm property is PDFEA_RC4 (default), othersise it is ignored. Note: Keys with length greater than 40 bit require PDF version (IPDFExportFeatures::PDFVersion) at least 1.4. This property is PDFKL_40Bit by default. |
Passwords | ||
OwnerPassword | BSTR |
Stores owner password. Opening the document with the correct owner password (assuming it is not the same as the user password) allows full (owner) access to the document. This unlimited access includes the ability to change the document’s passwords and access permissions. The default value is an empty string. |
UserPassword | BSTR |
Stores the user password. Opening the document with the correct user password (or opening a document that does not have a user password) allows additional operations to be performed according to the user access permissions specified in the document’s encryption dictionary. The default value is an empty string. |
Permissions | ||
PermissionAddAnnotations | VARIANT_BOOL |
Enables or disables modifying text annotations, filling out interactive form fields, and signing the document (which amounts to filling out existing signature fields, a type of interactive form field); together with the PermissionModifyContent property, also allows adding new text annotations and form fields. The default value is FALSE. |
PermissionAssembleDoc | VARIANT_BOOL |
Enables or disables assembling the document: inserting, rotating, deleting pages and creating navigation elements such as bookmarks and thumbnail images. This property is ignored in PDF version 1.3 (see IPDFExportFeatures::PDFVersion). The default value is FALSE. |
PermissionExtractTextAndGraphics | VARIANT_BOOL |
Enables or disables copying and otherwise extracting text and graphics from the document. However, extracting text and graphics for the purposes of accessibility to disabled users will still be possible, independently of this property value. The default value is FALSE. |
PermissionExtractTextAndGraphicsExt | VARIANT_BOOL |
Enables or disables extracting text and graphics (to make them accessible to users with disabilities or for other purposes). This property is ignored in PDF version 1.3 (see IPDFExportFeatures::PDFVersion). The default value is FALSE. |
PermissionFillFormFields | VARIANT_BOOL |
Enables or disables filling out existing interactive form fields and signing the document (which amounts to filling out existing signature fields, a type of interactive form field). This property is ignored in PDF version 1.3 (see IPDFExportFeatures::PDFVersion). The default value is FALSE. |
PermissionModifyContent | VARIANT_BOOL |
Enables or disables modifying the contents of the document. The default value is FALSE. |
PermissionPrint | VARIANT_BOOL |
Enables or disables printing the document. The default value is FALSE. |
PermissionPrintExt | VARIANT_BOOL |
Enables or disables printing to a representation from which a faithful digital copy of the PDF content could be generated. Disallowing such printing may result in degradation of output quality (a feature implemented as "Print As Image" in Acrobat). The value of this property is ignored if:
The default value is FALSE. |
Related objects
Samples
The object is used in the following code samples: CommandLineInterface.
See also
03.07.2024 8:50:25