New Forum | Previous | Next | (P-PDF) Developers
Topic: Opening a password protected file
Conf: (P-PDF) Developers, Msg: 103117
Date: 1/1/2004 02:05 AM
Is there a way to open, through code, a pdf file that has a password? I have a vb app that needs to be able to open a pdf file, check it for certain attributes, and possible make changes. The code works fine if the pdf doesn't have a password, but if there is a password it simply fails to open the file. No password dialog is displayed, and there doesn't appear to be any way to determine (again, through code) whether the file has a password or to apply a password if I know what it is.
The code I'm using now is basically:
Set objAcro = CreateObject("AcroExch.App")
Set objPDDoc = CreateObject("AcroExch.PDDoc")
If objPDDoc.Open(strFile) = 0 Then
The file cannot be visible to the user.