iOS 7 (and newer) can't open PDF in new browser window

后端 未结 2 6228
抹茶落季
抹茶落季 2020-12-20 00:29

I have big trouble with jsPDF since iOS7 exists. We developed a Web App and used jsPDF to create PDFs on-the-fly. We open the PDF in a new Safari window so that the user get

2条回答
  •  失恋的感觉
    2020-12-20 01:08

    Have you tried using doc.output('dataurlnewwindow')?

    If that doesn't work, you could make a new route like /pdf/download?data=base64data... and response the pdf there with Content-Type: application/pdf and based on the given parameter data. Be sure to avoid possible security issues, so that no other one can provide pdfs with your url.

提交回复
热议问题