WEB打印设置解决方案二
2018-09-06 10:54
下载ScriptX.cab控件,修改codebase的值,默认下面的设置也可以。
页面加载控件:
<object id=factory style=display:none viewastext classid=clsid:1663ed61-23eb-11d2-b92f-008048fdd814 codebase=
控件使用教本:
<scriptdefer>
functionSetPrintSettings(){
//--advancedfeatures,未曾使用过,有待确认。
factory.printing.SetMarginMeasure(2) //measuremarginsininches
factory.SetPageRange(false,1,3) //needpagesfrom1to3
factory.printing.printer=HPDeskJet870C
factory.printing.collate=true
factory.printing.paperSize=A4
factory.printing.paperSource=Manualfeed
//--basicfeatures使用过
factory.printing.header=ThisisMeadCo
factory.printing.footer=AdvancedPrintingbyScriptX
factory.printing.portrait=false //方向,true
factory.printing.leftMargin=1.0
factory.printing.rightMargin=1.0
factory.printing.bottomMargin=1.0
factory.printing.Print(false) //直接打印,true,好像不起作用,总是弹出选择打印机窗口
factory.printing.PageSetup()//打印设置
factory.printing.Preview() //打印预览
}
</script>
上一篇:asp调用Word打印的代码