WEB打印

原创 2007年10月12日 15:09:00

WEB打印

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>

(2)
<script language="javascript">
  function printsetup(){
  // 打印页面设置
  wb.execwb(8,1);
  }
  function printpreview(){
  // 打印页面预览
    
  wb.execwb(7,1);
     
    
  }

  function printit()
  {
  if (confirm(确定打印吗?)) {
  wb.execwb(6,6)
  }
  }
  </script>
</head>
<body>
<OBJECT ………%>> //保存服务器端传来的数据
………
</HTML>  

版权声明:本文为博主原创文章,转载请注明出处: http://blog.csdn.net/proglovercn 。
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:WEB打印
举报原因:
原因补充:

(最多只允许输入30个字)