LODOP中ADD_PRINT_TABLE、HTM、HTML表格自动分页测试
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
LODOP中超文本超过打印项高度会自动分页,那么对于超大行,该行处在分页高度位置会怎样呢? 测试结果: ADD_PRINT_HTM特点:切行没切字,补充了表格线,该超大行分页后成了多行。 ADD_PRINT_HTML特点:切行切字,不补表格线,类似截图,把内容当图截了。 测试代码: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WEB打印控件LODOP</title> <script language="javascript" src="LodopFuncs.js"></script> </head> <body> <form id="form1"> <table border="1" style="border-collapse:collapse"> <tr> <td>● PRINT_INIT(strPrintTaskName)打印初始化 ● SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)设定纸张大小 ● ADD_PRINT_HTM(intTop,intLeft,intWidth,intHeight,strHtml)增加超文本项 ● ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent)增加纯文本项 ● ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项 ● ADD_PRINT_SHAPE(intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor)画图形 ● SET_PRINT_STYLE(strStyleName, varStyleValue)设置对象风格 ● PREVIEW打印预览 ● PRINT直接打印 ● PRINT_SETUP打印维护 ● PRINT_DESIGN打印设计 ● PRINT_INIT(strPrintTaskName)打印初始化 ● SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)设定纸张大小 ● ADD_PRINT_HTM(intTop,intLeft,intWidth,intHeight,strHtml)增加超文本项 ● ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent)增加纯文本项 ● ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项 ● ADD_PRINT_SHAPE(intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor)画图形 ● SET_PRINT_STYLE(strStyleName, varStyleValue)设置对象风格 ● PREVIEW打印预览 ● PRINT直接打印 ● PRINT_SETUP打印维护 ● PRINT_DESIGN打印设计 ● PRINT_INIT(strPrintTaskName)打印初始化 ● SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)设定纸张大小 ● ADD_PRINT_HTM(intTop,intLeft,intWidth,intHeight,strHtml)增加超文本项 ● ADD_PRINT_TEXT(intTop,intLeft,intWidth,intHeight,strContent)增加纯文本项 ● ADD_PRINT_TABLE(intTop,intLeft,intWidth,intHeight,strHtml)增加表格项 ● ADD_PRINT_SHAPE(intShapeType,intTop,intLeft,intWidth,intHeight,intLineStyle,intLineWidth,intColor)画图形 ● SET_PRINT_STYLE(strStyleName, varStyleValue)设置对象风格 ● PREVIEW打印预览 ● PRINT直接打印 ● PRINT_SETUP打印维护 ● PRINT_DESIGN打印设计</td> <td>PRINT_INIT(strPrintTaskName)打印初始化</td> <td>PRINT_INIT(strPrintTaskName)打印初始化</td> </tr> <tr> <td>PRINT_INIT(strPrintTaskName)打印初始化</td> <td>PRINT_INIT(strPrintTaskName)打印初始化</td> <td>PRINT_INIT(strPrintTaskName)打印初始化</td> </tr> </table> </form> <a href="javascript:prn1_preview()">ADD_PRINT_TABLE打印预览</a><br> <a href="javascript:prn2_preview()">ADD_PRINT_HTM打印预览</a><br> <a href="javascript:prn3_preview()">ADD_PRINT_HTML打印预览</a><br> <script language="javascript" type="text/javascript"> var LODOP; //声明为全局变量 function prn1_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.SET_PRINT_PAGESIZE(0,2500,1000,""); LODOP.ADD_PRINT_TABLE(10,0,350,200,document.getElementById("form1").innerHTML); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn2_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.SET_PRINT_PAGESIZE(0,2500,1000,""); LODOP.ADD_PRINT_HTM(10,0,350,200,document.getElementById("form1").innerHTML); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn3_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.SET_PRINT_PAGESIZE(0,2500,1000,""); LODOP.ADD_PRINT_HTML(10,0,350,200,document.getElementById("form1").innerHTML); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; </script> </body> 图示: 该文章在 2023/9/25 22:32:05 编辑过 |
关键字查询
相关文章
正在查询... |