DecryptFile

Document management, Security and Signatures

Description

This function attempts to remove the encryption from a file on disk, saving the decrypted document to a new file.

This function will succeed even if the user password is supplied (including an valid blank password) rather than the master password. Developers are advised that they should respect the security wishes of the document's author.

Syntax

Delphi

function TPDFlib.DecryptFile(Const InputFileName, OutputFileName, Password: WideString): Integer;

ActiveX

Function PDFlib::DecryptFile(InputFileName As String, OutputFileName As String, Password As String) As Long

DLL

int DLDecryptFile(int InstanceID, wchar_t * InputFileName, wchar_t * OutputFileName, wchar_t * Password);

Parameters

InputFileNameThe name of the file to decrypt.
OutputFileNameThe name of the destination file to create. If this file already exists it will be overwritten.
PasswordThe password to use when decrypting the file.

Return values

0The document could not be decrypted. Check the result of the LastErrorCode function to determine the cause of the failure.
1The document was decrypted successfully