关于WEB页面的打印方面的,要求能自动设置打印的,纵横,页边距

解决方案 »

  1.   


    打印
    <script language="JavaScript">
    function   printpage(m_printpage1)

    var   newstr   =   document.getElementById(m_printpage1).innerHTML;       
    var   oldstr   =   document.body.innerHTML;       
    document.body.innerHTML   =   newstr;       
    window.print();         
    document.body.innerHTML   =   oldstr;       
    return   false;       
    }
    </script>
    <div><A onclick="printpage('contentDiv');" href="#">[打印]</A></div>
    <div id="contentDiv" style="BACKGROUND-COLOR: #00ccff">
    要打印的内容
    </div>
      

  2.   

    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.collate = true
     factory.printing.paperSize = "A4" // -- 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
    }
    谁能帮我解释一下这段代码?
    调试不能通过
    需要其他的设置吗?
      

  3.   

    web打印要手工设置有难度把,没做过
      

  4.   

    <OBJECT height=378 width=440><PARAM NAME="movie" VALUE="http://www.maidee.com/v/44rfc3L7r0.swf">
    <embed src=http://www.maidee.com/v/44rfc3L7r0.swf type=application/x-shockwave-flash width=440 height=378 allowFullScreen=true></embed></OBJECT>