c# - chrome adobe pdf reader javascript 黑屏

标签 c# javascript google-chrome pdf

您好,我使用 C# ASP.NET 应用程序生成了一个 PDF 文档。 我们有一个“生成 PDF”按钮,然后调用以下 javascript 代码。

window.open("pdfdoc.pdf");

当我在 Chrome 中执行此操作时,我会看到一个白色屏幕,当我按 CTRL+F5 时,有时 pdf 会显示在浏览器中。奇怪还是什么?

如果我运行

document.location = "pdfdoc.pdf";

pdf 文档显示在浏览器中,但我想在新窗口中打开它。

我安装了最新版本的 chrome (32.0.1700.76m) 和最新版本的 adobe acrobat reader 插件 (11.0.06.70)。

我做错了什么?

最佳答案

这不是您的应用的问题,而是 Chrome 版本 32.XXX 版本的问题。请参阅此论坛:https://productforums.google.com/forum/#!msg/chrome/uAWgIZZb01g/MtIzWG4casUJ以及此错误报告:https://code.google.com/p/chromium/issues/detail?id=333449

关于c# - chrome adobe pdf reader javascript 黑屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21281017/

相关文章:

javascript - 我无法使用 nodejs 和 mongodb 中的 get 方法从 html 控件中获取数据

html - 在 chrome 中使用 datalist 的 HTML5 <input> 标签溢出

c# - 消除运行连续 exe 文件的闪烁

c# - 在后面的代码中从 DataTable 设置 javascript 数组

C#.Net - 如何取消从 WebService 中提取数据的 BackgroundWorker

javascript - PNotify Confirm Module on Mobile with Modal 模式

c# - 最后抛出异常。 CLR 行为与 try-catch block

javascript - react native : Background Image not being shown

google-chrome - 在 ASP.NET 中获取 manifest.json GCM 推送通知的未经授权 401

google-chrome - 谷歌浏览器下划线样式改变了吗?