0

Hi I am embedding a webpage using iframe. The webpage consists of a form, which upon being submitted opens a pdf and print dialog for the screen. How can I use javascript to tell if the pdf is being printed?

For example, heres essentially what I want to do in pseudo code

if(document.getElementById('iframe').webpageisPrinting){
     //prevent webpage from printing
     //do other stuff
}
mdash1
  • 1,115
  • 4
  • 17
  • 31
  • Possible duplicate of [Detecting browser print event](https://stackoverflow.com/questions/1234008/detecting-browser-print-event) – George Aug 15 '17 at 18:33
  • @George I don't believe these are the same questions/duplicates. That question does ask about printing (it also appears that the accepted answer does not work for iframe [I tested it on my app] and some of the other responses do not work today), but does not ask about iframes. Can you please clarify on code that would work for iframe – mdash1 Aug 15 '17 at 19:08

0 Answers0