1

我正在尝试打开和编辑(添加注释)并将 PDF 保存到 IISWebDAV 存储库。我在 XP SP2 上使用 Acrobat Pro 9.0 和 IIS 5.0。

  1. 我需要能够从 Winform 应用程序以编程方式打开 Acrobat。我尝试使用 Process.Start(url),但它会在浏览器文档中打开 PDF。在 Acrobat 中尝试了以下设置,但没有成功。 http://www.mydigitallife.info/2007/06/17/disable-pdf-from-opening-in-web-browser-ie-firefox-opera-safari/

尝试了以下代码,但它打开了命令提示符并且没有打开 Acrobat。字符串 url = " http://localhost/SampleWebDAV/Root/TestDoc100.doc "; 进程 p = new Process(); p.StartInfo.FileName = Environment.GetEnvironmentVariable("COMSPEC"); p.StartInfo.Arguments = "/c \"start \"" + url + "\""; p.Start();

  1. Acrobat 不会发出 LOCK/UNLOCK WebDAV 命令。Acrobat 9.0 发行说明说它支持 WebDAV,但如果我用 fiddler 拦截请求,我可以看到只有 GET、PROPFIND 和 PUT 命令正在发生。我看不到 LOCK 和 UNLOCK 命令。

谢谢。!

4

1 回答 1

0

I am updating the result of my research.

  1. Process.Open() can not be used to open an Acrobat file from a web/wendav URL The same result can be seen if you try to pass the path to the Actobat.exe. Only the local machine paths can be given.

I evaluated many third party tool, but nobody has this functionality to open adobe from a Url.

  1. But Adobe ActiveX component can be used to view the component even from a WebDAV/Web location. You just need to set the URL accordingly But this component doesn't allow you to modify the PDF like adding an annotation etc.

I solved my issue by downloading the file to a local directory and then opening using Process.Start().

于 2009-08-26T13:23:18.160 回答