如何用webbrowser来设置IE 横向打印
1个回答
展开全部
用execwb这个组件不能直接实现横向打印.可以考虑用这个:
<script language="Javascript">
function doprint() {
//save existing user's info
var h = factory.printing.header;
var f = factory.printing.footer;
//hide the button
document.all("printbtn").style.visibility = 'hidden';
//set header and footer to blank
factory.printing.header = "";
factory.printing.footer = "";
factory.printing.portrait = false;//关键是这句,纵向打印为FALSE即为横向打印
//print page without prompt
factory.DoPrint(true);
//restore user's info
factory.printing.header = h;
factory.printing.footer = f;
//show the print button
document.all("printbtn").style.visibility = 'visible';
}
</script>
<script language="Javascript">
function doprint() {
//save existing user's info
var h = factory.printing.header;
var f = factory.printing.footer;
//hide the button
document.all("printbtn").style.visibility = 'hidden';
//set header and footer to blank
factory.printing.header = "";
factory.printing.footer = "";
factory.printing.portrait = false;//关键是这句,纵向打印为FALSE即为横向打印
//print page without prompt
factory.DoPrint(true);
//restore user's info
factory.printing.header = h;
factory.printing.footer = f;
//show the print button
document.all("printbtn").style.visibility = 'visible';
}
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询