MeadCo's ScriptX Printing Programming Manual 上面什么都有的嘛。<body>
<object id=factory style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="ScriptX.cab#Version=6,1,429,14">
</object>
<script>
function preview() {
factory.printing.header = "This is MeadCo"
factory.printing.footer = "Printing by ScriptX 5.x"
factory.printing.portrait = false
factory.printing.leftMargin = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMargin = 1.0
factory.printing.bottomMargin = 1.0
factory.printing.Preview()
}
function printWindow() {
factory.printing.header = "This is MeadCo"
factory.printing.footer = "Printing by ScriptX 5.x"
factory.printing.portrait = false
factory.printing.leftMargin = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMargin = 1.0
factory.printing.bottomMargin = 1.0
factory.printing.Print(true, window)
}
</script>
<button onclick="preview()">preview</button>
<button onclick="printWindow()">printWindow</button></body>
<object id=factory style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="ScriptX.cab#Version=6,1,429,14">
</object>
<script>
function preview() {
factory.printing.header = "This is MeadCo"
factory.printing.footer = "Printing by ScriptX 5.x"
factory.printing.portrait = false
factory.printing.leftMargin = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMargin = 1.0
factory.printing.bottomMargin = 1.0
factory.printing.Preview()
}
function printWindow() {
factory.printing.header = "This is MeadCo"
factory.printing.footer = "Printing by ScriptX 5.x"
factory.printing.portrait = false
factory.printing.leftMargin = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMargin = 1.0
factory.printing.bottomMargin = 1.0
factory.printing.Print(true, window)
}
</script>
<button onclick="preview()">preview</button>
<button onclick="printWindow()">printWindow</button></body>
解决方案 »
- 关于弹出窗口提交后,刷新父窗口的问题
- 一个在firefox下打开本地文件的思路^_^
- js 取值问题,(急)!!
- 求通用的右键弹出试菜单(用JAVASCRIPT写的)
- 我想在网页中动态显示数据库中的内容,请问我的代码有什么问题?总是提示没有Server!
- 关于表格分页打印的问题
- 继续问:flyskytoday(光风(每天进步一点)) ttyp(愿赌服输) 等高手!
- 使用阿信deeptree树型菜单,如何实现这种功能,谢谢!
- 如何判断输入内容为a-z,A-Z,0-9.急用,急用,在线等待
- 那位老大能给我一个好一点的js日期组件的网址。
- 可以在父窗口的代码中访问弹出子窗口中的控件或数组(最好是数组)吗?~ 怎么实现?~~ 请高手不惜赐教!
- 如何将javascript写的类或者函数,作为web service发布给调用者调用?
smsx.cab contains both the ScriptX and the Security Manager?/SPAN> binaries required to publish fully-functional licensed content:<!-- MeadCo Security Manager -->
<object viewastext style="display:none"
classid="clsid:5445be81-b796-11d2-b931-002018654e2e"
codebase="smsx.cab#Version=6,1,428,11">
<param name="GUID" value="{1FB3613D-2B04-11D4-A695-0000863B364E}">
<param name="Path" value="sxlic.mlf">
<param name="Revision" value="0">
</object><!-- MeadCo ScriptX -->
<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="smsx.cab#Version=6,1,428,11">
</object>
NOTE: the {1FB3613D-2B04-11D4-A695-0000863B364E} value of the GUID parameter used above identifies the MeadCo evaluation license that authors may use to experiment with Advanced printing capabilities. The license validates local filesystem (file://) and local website (http://localhost/) content for evaluation purposes only on a single development computer.The evaluation license is periodic. It will expire in a few months and will be replaced by a new one with a different GUID, so any code depending on the evaluation license may suddenly stop working at any time.Registered customers are issued with an unique license identifier and a digitally signed sxlic.mlf license file. See the licensing?/SPAN> page for more details. Check out the sources of the Advanced and Techie printing examples for a complete illustration of how to use licensed ScriptX functionality. The following JScript code snippet shows how to modify printing settings so as to print to a specific printer:<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
}function Print(frame) {
factory.printing.Print(true, frame) // print with prompt
}
</script>
A subtle JScript syntax issue may occur when setting a printer name that contains back slashes. Don't forget to double the slashes:factory.printing.printer = "\\\\FS-LYS-01\\HP5n-759" // print to \\FS-LYS-01\HP5n-759