DTWAIN_SetPDFAESEncryption

Top  Previous  Next

The DTWAIN_SetPDFAESEncryption sets the encryption algorithm to AES 128-bit or AES 256-bit for a PDF file.

 

DTWAIN_BOOL DTWAIN_SetPDFAESEncryption (

DTWAIN_SOURCE

Source,

LONG

AESCompression

DTWAIN_BOOL

bEncryptAES );

 

Parameters

Source

An open TWAIN Source.

 

AESCompression

Denotes whether AES 128-bit encryption or AES 256-bit compression will be used.


bEncryptFile

Denotes whether to turn on or off the compression.

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_SetPDFAESEncryption() is used to enable or disable AES 128-bit or AES 256-bit encryption when creating a PDF file.  


The value of AESCompression must be one of the following:


DTWAIN_PDF_AES128

Turn on or off AES 128-bit encryption

DTWAIN_PDF_AES256

Turn on or off AES 256-bit encryption


If bEncryptFile is TRUE, the compression denoted by AESCompression is used.  If bEncryptFile is FALSE, the encryption is turned off.


Note that the DTWAIN_SetPDFEncryption() must also be called (this could be before or after DTWAIN_SetPDFAESEncryption to set up the other aspects of the encrypted PDF file such as turning on general encryption, passwords, user permissions, etc.



TWAIN State Transitions

The Source must be in State 4. or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function