本文介绍了Acrobat DLL异常(将pdf转换为tif)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在尝试使用以下VB函数将pdf 文档转换为tiff文件: http://forums.microsoft.com/msdn/sho...&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 ''创建Acrobat应用程序对象 PDFApp = CreateObject(" AcroExch .App") ''创建Acrobat文档对象 PDDoc = CreateObject(" AcroExch.PDDoc") ''打开PDF文件 PDDoc.Open(fullPathPDF) ''从PDDoc对象创建AV文档 AV Doc = PDDoc.OpenAVDoc(TempPDF) ''隐藏Acrobat应用程序,所以一切都在无声中完成 模式 PDFApp.Hide() ''创建Javascript桥对象 JSObj = PDDoc.GetJSObject() ''尝试将PDF保存到TIF图像文件。 ''SaveAs方法语法.SaveAs(strFilePath,cConvID) ''对于TIFF输出正确的cConvid是 " com.adobe.acrobat.tiff" ''cCovid必须全部小一些。 JSObj.SaveAs(fullPathTIF," com .adobe.acrobat.tiff") PDDoc.Close() PDFApp.CloseAllDocs() ''清理 System.Runtime.InteropServices.Marshal.ReleaseComO bject(JSObj) JSObj = Nothing System.Runtime.InteropServices。 Marshal.ReleaseComO bject(PDFApp) PDFApp = Nothing System.Runtime.InteropServices.Marshal.ReleaseComO bj等等(PDDoc) PDDoc =没什么 System.Runtime.InteropServices.Marshal.ReleaseComO bject(AVDoc) AVDoc =什么都没有 结束子 它在行PDFApp = CreateObject(" AcroExch.App")上给出例外 =无法创建ActiveX组件 我有acrobat 8.我是否需要安装SDK或其他组件? 解决方案 ''尝试将PDF保存到TIF图像文件。 ''SaveAs方法语法.SaveAs(strFilePath,cConvID) ''对于TIFF输出,正确的cConvid是 " com.ado be.acrobat.tiff" ''cCovid必须全部小一些。 JSObj.SaveAs(fullPathTIF,com.adobe.acrobat.tiff) System.Runtime.InteropServices.Marshal.ReleaseComO bject(PDFApp) PDFApp = Nothing I''m trying to use the following VB function to transform a pdfdocument to a tiff one: http://forums.microsoft.com/msdn/sho...&tf=0&pageid=1Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByValfullPathTIF As String)Dim PDFApp As Acrobat.AcroAppDim PDDoc As Acrobat.CAcroPDDocDim AVDoc As Acrobat.CAcroAVDocDim JSObj As Object'' Create Acrobat Application objectPDFApp = CreateObject("AcroExch.App")'' Create Acrobat Document objectPDDoc = CreateObject("AcroExch.PDDoc")'' Open PDF filePDDoc.Open(fullPathPDF)'' Create AV doc from PDDoc objectAVDoc = PDDoc.OpenAVDoc("TempPDF")'' Hide Acrobat application so everything is done in silentmodePDFApp.Hide()'' Create Javascript bridge objectJSObj = 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 upSystem.Runtime.InteropServices.Marshal.ReleaseComO bject(JSObj)JSObj = NothingSystem.Runtime.InteropServices.Marshal.ReleaseComO bject(PDFApp)PDFApp = NothingSystem.Runtime.InteropServices.Marshal.ReleaseComO bject(PDDoc)PDDoc = NothingSystem.Runtime.InteropServices.Marshal.ReleaseComO bject(AVDoc)AVDoc = NothingEnd SubIt gives an exception at line PDFApp = CreateObject("AcroExch.App")=Cannot create ActiveX componentI have acrobat 8. Do I need to install SDK or some other component? 解决方案 这篇关于Acrobat DLL异常(将pdf转换为tif)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-15 11:24