Open jsPDF created pdf in Chrome's new tab/window

前端 未结 5 660
我寻月下人不归
我寻月下人不归 2021-01-03 16:01

How can I open with javascript link data:application/pdf;filename=generated.pdf;base64;DATA in Chrome 71?
Link from console opened successfully, but not fro

5条回答
  •  有刺的猬
    2021-01-03 16:18

    I run code from the question in the local machine and take this error:

    Not allowed to navigate top frame to data URL: data:application/pdf;filename=generated.pdf;base64,...

    JsPDF - Not allowed to navigate top frame to data URL

    I tried the suggestion @WeihuiGuo. Unfortunately for me.

    I found than Chrome automaticaly open pdf.

    https://support.google.com/chrome/answer/6213030?hl=en
    https://groups.google.com/a/chromium.org/forum/#!topic/chromium-bugs/z5hA0H6LFws

    And not only for the new tab. Not opened on the current page too.
    https://sphilee.github.io/jsPDF-CustomFonts-support/

    In other browsers this page display correctly.

    Such sad news.

提交回复
热议问题