Printing a page on safari with window.print() doesn't work the second time

Viewed 348

I am trying to print a page in Safari.

The first time it works fine, but if I click Cancel in the print dialog, and then click my print button again, it will just show a blank page on the print preview dialog.

In my case i am trying to print a PDF, so i am creating an invisible iframe and setting the content of it to be a PDF blob. (based on this library). But the same thing happens when trying to print the top level window.

Code example: https://codesandbox.io/s/throbbing-surf-tnuz6?file=/src/index.js

0 Answers
Related