LDOOP在WEB頁(yè)面打印時(shí)設(shè)置關(guān)聯(lián)后內(nèi)容超出新起一頁(yè)LinkNewPage指令
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
關(guān)聯(lián)打印的時(shí)候,top,left關(guān)聯(lián)位置是相對(duì)于被關(guān)聯(lián)打印項(xiàng)的偏移值,具體可查看本博客相關(guān)介紹博文:LODOP打印控件關(guān)聯(lián)輸出各內(nèi)容 正常情況下,超文本超過(guò)打印項(xiàng)高度,或紙張高度會(huì)自動(dòng)分頁(yè),如果超文本紙張放不下,會(huì)自動(dòng)分頁(yè)到第二頁(yè),而且是原位置輸出。 測(cè)試代碼: <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> <a href="javascript:prn1_preview()">打印</a><br> <a href="javascript:prn2_preview()">打印加了LinkNewPage的</a> <script language="javascript" type="text/javascript"> var LODOP; //聲明為全局變量 function prn1_preview() { LODOP=getLodop(); LODOP.PRINT_INIT("");//初始化 LODOP.SET_PRINT_PAGESIZE(1,1385,400,""); LODOP.ADD_PRINT_TEXT(0,0,100,"100%","文本"); LODOP.ADD_PRINT_HTM(36,9,300,100,"<body>\r HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...</font>\r</body>"); LODOP.SET_PRINT_STYLEA(0,"LinkedItem",-1); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn2_preview() { LODOP=getLodop(); LODOP.PRINT_INIT("");//初始化 LODOP.SET_PRINT_PAGESIZE(1,1385,400,""); LODOP.ADD_PRINT_TEXT(0,0,100,"100%","文本"); LODOP.ADD_PRINT_HTM(36,9,300,100,"<body>\r HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...</font>\r</body>"); LODOP.SET_PRINT_STYLEA(0,"LinkedItem",-1); LODOP.SET_PRINT_STYLEA(0,"LinkNewPage",true); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; </script> </body> 圖示:
不關(guān)聯(lián),不關(guān)聯(lián)后放不下自動(dòng)換頁(yè);關(guān)聯(lián),關(guān)聯(lián)后不設(shè)置自動(dòng)換頁(yè);關(guān)聯(lián) ,關(guān)聯(lián)后設(shè)置自動(dòng)換頁(yè)。對(duì)比圖片中的效果,可以看出效果和作用。 該文章在 2023/9/27 0:15:04 編輯過(guò) |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |