去看看这个。
http://xuewen8.com/technique/article_3694.html
http://xuewen8.com/technique/article_2170.html

解决方案 »

  1.   

    也遇到这样的问题,微软有段GDI+的例子代码,但如果Form比屏幕还要大,就打印不全了!
      

  2.   

    <script language="javascript" type="text/javascript">
            function preview()
            {
            bdhtml=window.document.body.innerHTML;
            sprnstr="<!--startprint-->";//设置开始标记
            eprnstr="<!--endprint-->";//设置结束标记
            prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
            prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
            window.document.body.innerHTML=prnhtml;
        //以下可以设置打印的样式    window.document.body.style.backgroundColor = '#ffffff';
            //window.document.body.style.color = '#000000';
            window.print();
            }
        </script>
    <a href='javascript:window.preview()'style="color: #000000">打印</a>