I have a pdf url, embedded in a rectangular area of an iframe. I am trying to print it on click of a button . My code looks like this :
JavaScript to print :
Folks, just got a solution , which works fine for me .
function printPage(htmlPage)
{
var w = window.open("about:blank");
w.document.write(htmlPage);
if (navigator.appName == 'Microsoft Internet Explorer') window.print();
else w.print();
}
So, if it is MSIE, then we can just use : window.print();