Visual C#Express Edition-无法使Acrobat pdf阅读器正常工作 [英] Visual c# Express Edition - can't get Acrobat pdf reader to work

查看:136
本文介绍了Visual C#Express Edition-无法使Acrobat pdf阅读器正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Visual C#2008 Express Edition项目中使用Acrobat跨应用程序通信(IAC)在C#应用程序中打开PDF文档.
执行以下代码时,出现异常:

I'm trying to open a PDF document inside a C# application using Acrobat Inter Application Communication (IAC) in a Visual C# 2008 Express Edition project.
When executing the following code I get an exception:

CAcroPDDoc pdDoc = new AcroPDDocClass();  

该异常报告特定CLSID的COM类工厂已失败,错误为80040154.在MSDN上的winerror.h中查找错误代码,该错误与未注册的类有关.
我尝试使用regsvr32注册Interop.Acrobat.dll,但这无法正常工作(找不到入口点DllRegisterServer).
我已经尝试了Acrobat 9 SDK随附的示例C#项目(BasicIacCS-有一个名为BasicIacCS.suo的Visual Studio项目,此项目导入到c#Express中没有任何错误,但由于相同的异常而失败).

The exception reports that the COM class factory for a particular CLSID has failed with error 80040154. Looking up the error code in winerror.h on MSDN the error is related to the class not being registered.
I tried using regsvr32 to register the Interop.Acrobat.dll but this fails to work (can't find entry-point DllRegisterServer).
I have tried the example C# project that comes with the Acrobat 9 SDK (BasicIacCS - there's a visual studio project called BasicIacCS.suo, this imports into c# Express without any errors but fails with the same exception).

我犯了一些根本性的错误吗? (我是Windows/.NET编程的新手)
速成版有可能吗?还是我应该升级到Visual Studio?

Am I making some fundamental mistake? (I'm new to Windows/.NET programming)
Is this possible under the express edition or should I upgrade to Visual Studio?

进一步研究这个问题,当我执行应用程序(.exe文件)的ILDASM时,抱怨的CLSID可用-这是我要访问的AcroPDDoc类的CLSID.注册表中缺少此类及其关联的CLSID. 我只安装了Acrobat Reader,而没有完整版本.访问COM接口是否需要完整版的Acrobat? (我只有Acrord32.dll,系统上没有Acrobat.dll). 我已经在另一台Vista机器上试用了相同的程序,并以相同的结果卸载/重新安装了Arobat Reader.

Looking further into the problem the CLSID that is being complained about is available when I do an ILDASM of my application (.exe file) - it's the CLSID of the AcroPDDoc class I'm trying to access. This class and it's associated CLSID is absent from the registry. I only have Acrobat reader installed - not the full version. Is the full version of Acrobat required to access COM interfaces? (I only have Acrord32.dll, not Acrobat.dll present on the system). I've tried out the same program on a different Vista machine and have uninstalled/reinstalled Arobat reader with the same result.

推荐答案

问题可能出在主要Acrobat dll未注册,而不是互操作dll.

The problem is probably in the main Acrobat dll not being registered, not the interop dll.

尝试重新安装Acrobat或注册Acrobat DLL.

Try reinstalling Acrobat, or registering the acrobat DLLs.

这篇关于Visual C#Express Edition-无法使Acrobat pdf阅读器正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆