This structure describes the data for the standard security handler.
Declaration:
Copy Code | |
---|---|
typedef struct tagAT_PDF_SECURITYDATA
{
AT_UINT size;
AT_PDF_BOOL newUserPW;
AT_PDF_BOOL hasUserPW;
CHAR userPW[256];
AT_PDF_BOOL newOwnerPW;
AT_PDF_BOOL hasOwnerPW;
CHAR ownerPW[256];
AT_DWORD perms;
LONG keyLength;
AT_INT32 revision;
AT_PDF_BOOL encryptMetadata;
LONG encryptMethod;
AT_PDF_BOOL encryptAttachmentsOnly;
AT_INT32 version;
} AT_PDF_SECURITYDATA;
typedef AT_PDF_SECURITYDATA FAR* LPAT_PDF_SECURITYDATA;
|
Members:
AT_UINT | size | Size of this structure. |
AT_PDF_BOOL | newUserPW | TRUE if the user password should be changed. |
AT_PDF_BOOL | hasUserPW | TRUE if there is a user password. |
CHAR | userPW[256] | The user password string. |
AT_PDF_BOOL | newOwnerPW | TRUE if the owner password should be changed; FALSE otherwise. |
AT_PDF_BOOL | hasOwnerPW | TRUE if an owner password is provided; FALSE otherwise. |
CHAR | ownerPW[256] | The owner password string. |
AT_DWORD | perms | Permissions to allow. An OR of the enumIGPDFPermsFlags values. |
LONG | keyLength | Encryption key length in byte. |
AT_INT32 | revision | Indicates /R value. |
AT_PDF_BOOL | encryptMetadata | Flag that indicates whether document metadata will be encrypted. |
LONG | encryptMethod | Method of encryption for filters to use. One of the enumIGPDFStdSecurityMethod values. |
AT_PDF_BOOL | encryptAttachmentsOnly | Flag to indicate that only Attachments are encrypted - encryptMetadata and encryptAttachmentsOnly cannot both be true. |
AT_INT32 | version | Indicates a /V value. |
Remarks:
The password strings in PDF are padded or truncated to exactly 32 bytes. If the password string is more than 32 bytes long, used only its first 32 bytes; if it is less than 32 bytes long, it padded by appending the required number of additional bytes from the beginning of the following padding string: <28 BF 4E 5E 4E 75 8A 41 64 00 4E 56 FF FA 01 08 2E 2E 00 B6 D0 68 3E 80 2F 0C A9 FE 64 53 69 7A >