|
Control "Vertical", "Horizontal" and "Page margins."
(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(){
// Print page setup
Wb.execwb(8,1);
}
Function printpreview(){
// Print page preview
Wb.execwb(7,1);
}
Function printit()
{
If (confirm("Are you sure to print?'')) {
Wb.execwb(6,6)
}
}
</script>
</head>
<body>
<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"
height=0 id=wb name=wb width=0></OBJECT>
<input type=button name=button_print value="print"
onclick="javascript:printit()">
<input type=button name=button_setup value="print page setup"
onclick="javascript:printsetup();">
<input type=button name=button_show value="print preview"
onclick="javascript:printpreview();">
<input type=button name=button_fh value="close"
onclick="javascript:window.close();"> |
|