【问题标题】:blob url in ie is not workingie中的blob url不起作用
【发布时间】:2015-08-30 11:49:37
【问题描述】:

我想使用 blob url 在 IE10 或 IE11 中显示 PDF。

这些是我用来构建 Blob URL 的

var url = URL.createObjectURL(blob)

使用createObjectURL() 创建的 Blob url 无法在 IE 和 firefox 中生成正确的 blob url。但适用于 Chrome。

但 Adob​​e 已移除对 chrome 的 PDF 插件支持。

除了createObjectURL 方法之外,还有其他方法可以显示blob url吗?

【问题讨论】:

  • 图片也有同样的问题,如果你有好的解决方法请贴出来

标签: javascript pdf adobe


【解决方案1】:

看看this link。他们甚至有一个可以渲染 blob 的查看器。

注意: IE 在将 blob url 传递给查看器之前将其包装在 encodeURIComponent() 中,如下所示:

'http://viewer.html?file=' + encodeURIComponent(blobUrl)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-02-03
    • 2017-12-10
    • 1970-01-01
    • 2021-07-12
    • 1970-01-01
    • 2015-09-15
    • 2020-09-23
    • 2020-04-13
    相关资源
    最近更新 更多