LODOP中ADD_PRINT_TABLE、HTM、HTML表格自動分頁測試
當(dāng)前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
LODOP中超文本超過打印項高度會自動分頁,那么對于超大行,該行處在分頁高度位置會怎樣呢? 測試結(jié)果: ADD_PRINT_HTM特點:切行沒切字,補充了表格線,該超大行分頁后成了多行。 ADD_PRINT_HTML特點:切行切字,不補表格線,類似截圖,把內(nèi)容當(dāng)圖截了。 測試代碼: <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)設(shè)定紙張大小 ● 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)設(shè)置對象風(fēng)格 ● PREVIEW打印預(yù)覽 ● PRINT直接打印 ● PRINT_SETUP打印維護 ● PRINT_DESIGN打印設(shè)計 ● PRINT_INIT(strPrintTaskName)打印初始化 ● SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)設(shè)定紙張大小 ● 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)設(shè)置對象風(fēng)格 ● PREVIEW打印預(yù)覽 ● PRINT直接打印 ● PRINT_SETUP打印維護 ● PRINT_DESIGN打印設(shè)計 ● PRINT_INIT(strPrintTaskName)打印初始化 ● SET_PRINT_PAGESIZE(intOrient,intPageWidth,intPageHeight,strPageName)設(shè)定紙張大小 ● 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)設(shè)置對象風(fēng)格 ● PREVIEW打印預(yù)覽 ● PRINT直接打印 ● PRINT_SETUP打印維護 ● PRINT_DESIGN打印設(shè)計</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打印預(yù)覽</a><br> <a href="javascript:prn2_preview()">ADD_PRINT_HTM打印預(yù)覽</a><br> <a href="javascript:prn3_preview()">ADD_PRINT_HTML打印預(yù)覽</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 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |