简体   繁体   English

使用 Process.Start 从 c# 打开 pdf:Adobe Reader 在 3 秒后关闭

[英]Open pdf from c# with Process.Start: Adobe Reader closes after 3 seconds

Using Process.Start("myfile.pdf") from main thread opens Adobe Reader with the correct file, but closes it after 3 seconds.从主线程使用Process.Start("myfile.pdf")打开带有正确文件的 Adob​​e Reader,但会在 3 秒后关闭它。

Same with Process.Start("myfile.txt") keeps Notepad open.Process.Start("myfile.txt")相同,使记事本保持打开状态。 When I switch to Chrome as the default pdf-viewer, the Window is also kept open.当我切换到 Chrome 作为默认的 pdf 查看器时,窗口也保持打开状态。

How do I keep the Reader alive?如何让 Reader 保持活力?

The default application was not Adobe Reader as I mentioned, but Acrobat Version 7 (oldish).默认应用程序不是我提到的 Adob​​e Reader,而是 Acrobat 版本 7(旧版)。 After installing the Reader and being forced to uninstall Acrobat (krrr, Adobe.....), things worked as expected.安装 Reader 并被迫卸载 Acrobat(krrr,Adobe .....)后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM