I have created the print function that is working fine in chrome but in firefox its printing blank page. because print dialog comes before the PDF fully loaded so when we hit "ok" its perform the action to print. Question is how to add delay to print dialog to appear after PDF fully Loaded.
Here is My Code:
function printPDF(url)
{
var w = window.open(url);
var FIREFOX = /Firefox/i.test(navigator.userAgent);
if (FIREFOX) {
if (typeof w.print === 'undefined') {
setTimeout(function(){printPDF(url);},3000);
} else {
w.print();
}
}else{
w.print();
}
}