请教调用ie打印如何用asp除去打印页面的页眉页脚?
请教调用ie打印如何用asp除去打印页面的页眉页脚?
谢谢!
问题点数:0、回复次数:4Top
1 楼seking(随和)回复于 2003-12-04 12:30:37 得分 0
我也想知道..
另外一般你们是用什么方法打印的? 谢谢(效果要能自动伸缩)
MSN:
chenkeSeking@hotmail.comTop
2 楼dingyaohong(宏宏)回复于 2003-12-04 12:38:58 得分 0
大哥,真的没人知道?Top
3 楼Tal(Tal)回复于 2003-12-04 13:25:01 得分 0
1、控制"纵打"、 横打”和“页面的边距。
(1)<script defer>
function SetPrintSettings() {
// -- advanced features
factory.printing.SetMarginMeasure(2) // measure margins in inches
factory.SetPageRange(false, 1, 3) // need pages from 1 to 3
factory.printing.printer = "HP DeskJet 870C"
factory.printing.copies = 2
factory.printing.collate = true
factory.printing.paperSize = "A4"
factory.printing.paperSource = "Manual feed"
// -- basic features
factory.printing.header = "This is MeadCo" ''''''''''''''
factory.printing.footer = "Advanced Printing by ScriptX" ''''''''''''''''''''
factory.printing.portrait = false
factory.printing.leftMargin = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMargin = 1.0
factory.printing.bottomMargin = 1.0
}
</script>
Top
4 楼lei414(水瓶座)回复于 2004-01-08 15:19:08 得分 0
除去打印页面的页眉页脚
<HTML><HEAD>
<script language="JavaScript">
var hkey_root,hkey_path,hkey_key
hkey_root="HKEY_CURRENT_USER"
hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"
//设置网页打印的页眉页脚为空
function pagesetup_null()
{
try{
var RegWsh = new ActiveXObject("WScript.Shell")
hkey_key="header"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
hkey_key="footer"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"")
}catch(e){}
}
//设置网页打印的页眉页脚为默认值
function pagesetup_default()
{
try{
var RegWsh = new ActiveXObject("WScript.Shell")
hkey_key="header"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P")
hkey_key="footer"
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&u&b&d")
}catch(e){}
}
</script>
</HEAD>
<BODY><br/><br/><br/><br/><br/><br/><p align=center>
<input type="button" value="清空页码" onclick=pagesetup_null()>
<input type="button" value="恢复页码" onclick=pagesetup_default()><br/>
</p></BODY></HTML>Top




