我想将打印如下的单据 :
 
 以前我是用 PDF来实现的, 但是不是用来打印单据, 而是报表 ~ 请有做过的朋友 , 分享一下 ~~~~~~~

解决方案 »

  1.   

    //设置打印 
    <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> 
    <input type=button value=页面设置 onclick="factory.printing.PageSetup()"> 
    <input type=button value=打印预览 onclick="factory.printing.Preview()"> 
      
    <script language=javascript> 
    function window.onload() 

       // -- advanced features 
       factory.printing.SetMarginMeasure(2) // measure margins in inches 
       factory.printing.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 = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页" 
       factory.printing.footer = "(自定义页脚)" 
       factory.printing.portrait = false 
       factory.printing.leftMargin = 0.75 
       factory.printing.topMargin = 1.5 
       factory.printing.rightMargin = 0.75 
       factory.printing.bottomMargin = 1.5 

    function Print(frame) { 
      factory.printing.Print(true, frame) // print with prompt 

    </script> 
    <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> 
      

  2.   

     LS 说的是 ScriptX ?
      

  3.   

       jatoolsprinter ~~~~不过没有用过~
      

  4.   

    还是用 pdf 吧··这个比较正规··