4

I am using below piece of code to print an iframe with large data but in firefox it is only printing first page, the firefox don't print rest pages.

     window.frames[frameID].focus();
     window.frames[frameID].print();

Please suggest if any change is needed.

Thanks in advance.

ankit paul
  • 81
  • 1
  • 15

1 Answers1

0

I was found ability to print in Firefox with next statement:

 frame.focus();
 frame.contentDocument.body.innerHTML = '';
 frame.contentDocument.write(content);
 frame.contentWindow.print();

Works with Firefox 54.

Hope this helps anybody.

Drag13
  • 5,859
  • 1
  • 18
  • 42