javascript print Encyclopedia
(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
}
(2)
----------------- -------------------------------
There are other uses for this component, listed below:
WebBrowser.ExecWB(1,1) Open
Web.ExecWB(2,1) Close all current IE windows and open a new window
Web.ExecWB(4,1) Save the web page
Web.ExecWB(6,1) Print
Web.ExecWB(7,1) Print Preview
Web.ExecWB(8,1) Print Page Settings
Web.ExecWB(10,1) View the page properties
Web.ExecWB(15,1) It seems to be revoked and needs to be confirmed
Web.ExecWB(17,1) Select all
Web.ExecWB(22,1) Refresh
Web. ExecWB(45,1) Close the form silently
2. Print in pages