我可以临时设置 WebBrowser 控件的 Internet 选项以在浏览器中显示 PDF 吗?
我们有一个客户在工作中使用一种古老的工具来预览 PDF,以便他们可以将 PDF 中的数据输入到数据库中。我最近用 C# 重写了这个,因为我们用于预览的古老插件存在兼容性问题。
我决定让 Microsoft 和 Adobe 处理兼容性问题,因此我使用 WebBrowser 控件来显示 PDF,因为我知道您可以直接在浏览器中打开文件,并且如果我限制浏览器仅打开客户端文件上的文件-系统并且只有以“.pdf”结尾的文件应该相对安全。
有没有办法暂时(仅针对 WebBrowser 控件的实例)从 Internet 选项启用“在浏览器中显示 PDF”。客户同意他们的员工自己启用它,但我认为他们将其保留为公司默认的“不显示”可能更安全。
We have a client at work that uses an ancient tool to preview PDFs so they can enter data from the PDF into a database. I recently rewrote this in C# because there were compatibility issues with the ancient plug-ins we were using for the preview.
Deciding that I'd rather let Microsoft and Adobe deal with compatibility issues I used a WebBrowser control to show the PDFs because I knew you could open the file directly in the browser and if I restricted the Browser to opening only files on the client's file-system and only files ending with '.pdf' it should be relatively safe.
Is there was a way to temporarily (for just the WebBrowser control's instance) enable "Display PDFs in Browser" from the Internet Options. The client is ok with their employees enabling it themselves, but I think it's probably safer for them to leave it at the company-default of "Don't display".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 Acrobat Reader 设置,而不是 Internet 选项设置。编辑+首选项、互联网。我猜它被埋在注册表中的某个地方。
That's an Acrobat Reader setting, not an Internet Options setting. Edit + Preferences, Internet. I'd guess that it is buried somewhere in the registry.