点击这里给我发消息 点击这里给我发消息

WEB打印设置解决方案二(利用ScriptX.cab控件改变IE打印设置)

添加时间:2010-1-5
    相关阅读: WEB 解决方案 方案 页面
 

下载ScriptX.cab控件,修改codebase的值,默认下面的设置也可以。

页面加载控件:
<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object>

控件使用教本:
<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     //方向,true
              factory.printing.leftMargin = 1.0 
              factory.printing.topMargin = 1.0 
              factory.printing.rightMargin = 1.0 
              factory.printing.bottomMargin = 1.0
    
             factory.printing.Print(false)      //直接打印,true ,好像不起作用,总是弹出选择打印机窗口
             factory.printing.PageSetup()   //打印设置
             factory.printing.Preview()         //打印预览
       } 
</script>

本文作者:
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册