【问题标题】:Unable to see Base64 PDF in chrome browser using following code?无法使用以下代码在 chrome 浏览器中查看 Base64 PDF?
【发布时间】:2020-01-12 07:16:28
【问题描述】:

我正在使用 java 脚本代码 sn-p 查看我可以在 Internet Explorer 和 safari 中查看但无法在 Google chrome 上查看的 base64 字符串 pdf。 通过使用以下代码:

pdfWindow.document.write("");

【问题讨论】:

  • 错误是什么?你的问题已经在这里回答了source
  • 它只在 chrome 中显示空白页面,而相同的代码在其他浏览器中显示相应的文件数据

标签: javascript


【解决方案1】:

试试 jsPDF。它带有一个内置方法 pdf.output('dataurlnewwindow'),它使用 iframe。

【讨论】:

    猜你喜欢
    • 2020-03-25
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 2014-07-22
    • 1970-01-01
    • 2018-05-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多