html打印文档的方法

房东的猫 提交于 2019-12-19 21:55:35

html打印文档的方法

1、控制"纵打"、 横打”和“页面的边距。
(1)

// – 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
}

(2)

height=0 id=wb name=wb width=0>
<input type=button name=button_print value=“打印”

οnclick=“javascript:printit()”>
<input type=button name=button_setup value=“打印页面设置”

οnclick=“javascript:printsetup();”>
<input type=button name=button_show value=“打印预览”

οnclick=“javascript:printpreview();”>
<input type=button name=button_fh value=“关闭”

οnclick=“javascript:window.close();”>


关于这个组件还有其他的用法,列举如下:
WebBrowser.ExecWB(1,1) 打开
Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口
Web.ExecWB(4,1) 保存网页
Web.ExecWB(6,1) 打印
Web.ExecWB(7,1) 打印预览
Web.ExecWB(8,1) 打印页面设置
Web.ExecWB(10,1) 查看页面属性
Web.ExecWB(15,1) 好像是撤销,有待确认
Web.ExecWB(17,1) 全选
Web.ExecWB(22,1) 刷新
Web.ExecWB(45,1) 关闭窗体无提示

2、分页打印

<%while not rs.eof%>

<%=rs(0)%>

<%rs.movenext%> <%wend%>

3、ASP页面打印时如何去掉页面底部的路径和顶端的页码编号
(1)ie的文件-〉页面设置-〉讲里面的页眉和页脚里面的东西都去掉,打印就不出来了。
(2)

New Document






4、浮动帧打印 4、用FileSystem组件实现WEB应用中的本地特定打印
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!