I tried to find some workarounds to get more or less to the same result. These solutions should work fine on any browser.
Look at the solution 4. It seems to be the closest to what you want to achieve. (With working example)
Solution 1: I think I've got a solution that is not perfect, but might do the job.
Just before printing, you replace the iframe with an image of the iframe. I found this library called iframe2image
: https://github.com/twolfson/iframe2image.
To catch the printing event, you can use the answer to this question: https://stackoverflow.com/a/23170458/2525304
I haven't had the chance to test it, but I think you could get something going with this.
EDIT:
Solution 2: Here is another think that could work. You could use this Html to PDF api to first convert the content of the iframe to a pdf. Then include this pdf where the iframe was (by using PDF.js for example) and print the page.
Here is another api doing this: http://www.convertapi.com/web-pdf-api
EDIT 2:
Solution 3 (working example):
I just found this website that lets you embed a Save page to PDF
button that will return a pdf version of the page the user is on. You could replace the print button on your page with this button and tell the user to print the generated pdf.
Working example
The only problem is that the user is sent on another website to download the file. I think you can get a direct link to the pdf file when paying for the basic membership (5$/month).
There might be similar services offering a direct links for free that I haven't found.
EDIT 3:
Solution 4 (with working example):
I just found a website that gives a direct link to the generated PDF file of the page. More information here: http://pdf-ace.com/save-as-pdf-button/
Working example (I replaced the Print
button)