日期:2014-05-17  浏览次数:20696 次

帮帮忙
大家好,可以帮帮忙吗   ,ScriptX.cab     请问这个打印组件需要怎样安装,我才能在网页上自由控制打印?

------解决方案--------------------
<object id= "factory " viewastext style= "display:none "
classid= "clsid:1663ed61-23eb-11d2-b92f-008048fdd814 "
codebase= "http://127.0.0.1:90/ScriptX.cab#Version=5,60,0,360 ">
</object>

<script defer>
function SetPrintSettings() {
// -- advanced features
factory.printing.SetMarginMeasure(2); // measure margins in inches
factory.printing.printer = "HP DeskJet 870C ";
factory.printing.paperSize = "A4 ";
factory.printing.paperSource = "Manual feed ";
factory.printing.collate = true;
factory.printing.copies = 2;
factory.printing.SetPageRange(false, 1, 3); // need pages from 1 to 3

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

function Print(frame) {
factory.printing.Print(true, frame) // print with prompt
}
</script>
<input type=button value= "打印本页 " onclick= "factory.printing.Print(false,self) ">
<input type=button value= "页面设置 " onclick= "factory.printing.PageSetup() ">
<input type=button value= "打印预览 " onclick= "factory.printing.Preview() "> <br>

下载:
http://blog.jymass.com/ScriptX-Example.rar