RE: Acrobat DLL Exception (Transforming pdf to tif)



Hi,
You need to register the ActiveX component using the regsvr32.exe utility

regards,
Joy

"Mauro" wrote:

I'm trying to use the following VB function to transform a pdf
document to a tiff one:
http://forums.microsoft.com/msdn/showpost.aspx?postid=1665127&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1

Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByVal
fullPathTIF As String)
Dim PDFApp As Acrobat.AcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim AVDoc As Acrobat.CAcroAVDoc
Dim JSObj As Object

' Create Acrobat Application object
PDFApp = CreateObject("AcroExch.App")

' Create Acrobat Document object
PDDoc = CreateObject("AcroExch.PDDoc")

' Open PDF file
PDDoc.Open(fullPathPDF)

' Create AV doc from PDDoc object
AVDoc = PDDoc.OpenAVDoc("TempPDF")

' Hide Acrobat application so everything is done in silent
mode
PDFApp.Hide()

' Create Javascript bridge object
JSObj = PDDoc.GetJSObject()

' Attempt to save PDF to TIF image file.
' SaveAs method syntax .SaveAs( strFilePath, cConvID )
' For TIFF output the correct cConvid is
"com.adobe.acrobat.tiff"
' cCovid MUST BE ALL LOWERCASE.
JSObj.SaveAs(fullPathTIF, "com.adobe.acrobat.tiff")

PDDoc.Close()
PDFApp.CloseAllDocs()

' Clean up
System.Runtime.InteropServices.Marshal.ReleaseComObject(JSObj)
JSObj = Nothing


System.Runtime.InteropServices.Marshal.ReleaseComObject(PDFApp)
PDFApp = Nothing

System.Runtime.InteropServices.Marshal.ReleaseComObject(PDDoc)
PDDoc = Nothing

System.Runtime.InteropServices.Marshal.ReleaseComObject(AVDoc)
AVDoc = Nothing

End Sub

It gives an exception at line PDFApp = CreateObject("AcroExch.App")
=> Cannot create ActiveX component

I have acrobat 8. Do I need to install SDK or some other component?

.


Loading