在打印预览中显示图像时出现问题。 [英] Problem in displaying image in print preview.

查看:90
本文介绍了在打印预览中显示图像时出现问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

专家

使用下面提到的javascript来打印div

div还包含一张图像,除了图像所有内容都在打印预览中

但是图片没有显示请帮我解决这个问题

--------------------------- -------------------------------------





函数PrintPanel(){

var panel = document.getElementById(<%= div_print.ClientID%>);

var printWindow = window.open('','','height = 800,width = 800');

console.log(printWindow);

尝试{

printWindow.document.write('< html>< head>< title> / title>');

printWindow.document.write(' < / head><bodyöncontextmenu= new Function(return false)>');

printWindow.document.write(panel.innerHTML);

首席tWindow.document.write('< / body>< / html>');

printWindow.document.close();

}

catch(e){

console.dir(e);

}

setTimeout(function(){

printWindow.focus();

printWindow.print();

},500);

返回false;

}

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;
}

推荐答案

阅读完整文章。你将能够做到这一点。



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



如果您有帮助,请标记为已解答
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


这篇关于在打印预览中显示图像时出现问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆