[求助]关于网页打印,如何用程序设定打印页边距的高级问题
<object id= "factory " style= "display:none " viewastext classid= "clsid:1663ed61-23eb-11d2-b92f-008048fdd814 " codebase= "http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360 "> </object>
<script defer>
function window.onload() {
factory.printing.header = " "
factory.printing.footer = " "
factory.printing.leftMargin=10.75
factory.printing.topMargin=11.5
factory.printing.rightMargin=10.75
factory.printing.bottomMargin=11.5
}
</script>
<p> <input type= "button " value= "打印本页 " onclick= "factory.printing.Print(false) ">
<input type= "button " value= "页面设置 " onclick= "factory.printing.PageSetup() ">
<input type= "button " value= "打印预览 " onclick= "factory.printing.Preview() ">
<br>
<a href= "http://www.meadroid.com/scriptx/docs/printdoc.htm?static " target=_blank> 具体使用手册,更多信息,点这里 </a>
运行后,点击按钮,提示factory.printing为空或不是对像.这是怎么回事呀?高手们,高抬贵手吧........
------解决方案--------------------打印的页边距可以手动设置。如果要实现使用自动设置页面边距,据我所知必须要使用组件。
------解决方案--------------------http://www.webprintx.cn/
网站里有只打印页面内的图片而不打印页面其他东西的例子
WebPirntX用ActiveX方式直接控制打印机,设置页眉,页脚,页边距,纸张大小,纸张走向,不降低IE当前安全选项等等的所有问题