Link to home
Start Free TrialLog in
Avatar of Gordon_Atherley
Gordon_Atherley

asked on

Reading PDF metadata: problems with PDFVersion(Acrobat 3x), any workarounds with VB6?

When Acrobat Pro 6 is installed, the following VB 6 code works well
 
        Dim oPDF As Object
        Set oPDF = CreateObject("AcroExch.PDDoc")
        oPDF.Open (PathtoMyfile)        
        sFileTitle = oPDF.GetInfo("Title")

However, when this code encounters a PDF file with PDFVersion(Acrobat3.x) it hangs and eventually crashes.

Please can an expert suggest a workaround, such as a trap to detect the version before the hang/crash, or better yet, of course, a way to read the metadata of the legacy version?

Gordon
Avatar of Gordon_Atherley
Gordon_Atherley

ASKER

I'm encountering more and more pdfs that are five or more years old, so the problem of the version of Acrobat used to create them is getting quite urgent. I've increased the points accordingly.

Suggestions will be gratefully received

Gordon
I'm narrowing down the problem, which may help explain my question better.
On a machine with Acrobat Professional I can read the title of a pdf using this code

        Dim oPDF As Object
        Set oPDF = CreateObject("AcroExch.PDDoc")
        oPDF.Open (PathtoMyfile)        
        sFileTitle = oPDF.GetInfo("Title")

What should I subtitue for "Title" in GetInfo to read the PDF version?
In the dcoument properties (accessed from File > Properties), for a problem PDF, typically the data is

         PDF Version: 1.2(Acrobat 3.x)

I've tried various abbreviations of "PDF Version" without succes. Help would be really appreciated, please

Gordon
ASKER CERTIFIED SOLUTION
Avatar of Gordon_Atherley
Gordon_Atherley

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Moderator

I answered my own question, so may I please leave it to you to decide the outcome?

Gordon