Click here to Skip to main content
12,457,938 members (49,699 online)
Rate this:
 
Please Sign up or sign in to vote.
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 4-Aug-14 23:15pm
Updated 4-Aug-14 23:23pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 5 Aug 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100