here is my code to print a pdf file in JavaScript using iframe. but i cant able to print nothing is happening , but this code is perfectly working in google chrome. in IE8 not working. ContentLoaderDiv is html division. please help me..
When I print a PDF document from our application which uses Java script to print instead of adobe Reader print dialog the browser print dialog is invoked.
Have anyone seen this problem? How to invoke the Adobe reader printer dialog instead of browser print dialog?
function printPdf() {
var ContentLoaderDiv = document.getElementById('ContentLoaderDiv');
ContentLoaderDiv.innerHTML = "";
ContentLoaderDiv.innerHTML = '<div id="pdfdiv" style="position: relative;"><iframe id="frame1" height="800" width="700" src="' + document.getElementById("<%= hdnPDFPathForObject.ClientID %>").value + "print.pdf#scrollbar=1&toolbar=1&statusbar=0&messages=0&navpanes=1" + '"' + " /></iframe></div>";
frame1.focus();
frame1.print();
}