Click here to Skip to main content
15,920,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, experts
Am using below mentioned javascript to print a div
that div also contains one image except image all contents are coming in print preview
but image is not displaying please help me solve this issue
----------------------------------------------------------------


function PrintPanel() {
var panel = document.getElementById("<%=div_print.ClientID %>");
var printWindow = window.open('', '', 'height=800,width=800');
console.log(printWindow);
try {
printWindow.document.write('<html><head><title>/title>');
printWindow.document.write('</head><body öncontextmenu = new Function("return false") >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
}
catch (e) {
console.dir(e);
}
setTimeout(function() {
printWindow.focus();
printWindow.print();
}, 500);
return false;
}
Posted
Updated 4-Aug-14 23:23pm
v2

1 solution

Read the full Article. You will be able to do that.

http://aspsnippets.com/Articles/Export-Paging-enabled-Gridview-to-PDF-with-Formatting-using-iTextSharp-in-ASPNet.aspx[^]

Please Mark as answered if you got a help
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900