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.PDD oc")
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
Dim oPDF As Object
Set oPDF = CreateObject("AcroExch.PDD
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
ASKER
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.PDD oc")
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
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.PDD
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Moderator
I answered my own question, so may I please leave it to you to decide the outcome?
Gordon
I answered my own question, so may I please leave it to you to decide the outcome?
Gordon
ASKER
Suggestions will be gratefully received
Gordon