我用了LODOP控件实现打印发票功能,而在开始的设置参数的时候貌似是遇到问题了,套打出来的内容整体向下方移动了很多,请问应该怎么进行更改。发票规格为210mm*100mm
JS代码
<script language="javascript" type="text/javascript">
        var LODOP; //声明为全局变量         //document.getElementById("div").style.display = "none";        function preview() {
            try {
                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.print();                //LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
                LODOP.PRINT_INIT("");
                //LODOP.SET_PRINT_PAGESIZE(2, 2100, 1000);
                LODOP.ADD_PRINT_HTM(10, 15, "21cm", "10cm", prnhtml);
                LODOP.PREVIEW();
                return true;
            } catch (e) {
                return false;
            }
        };
    </script>