Lodop單獨(dú)縮放文字打印,垂直或水平壓縮文字,圖片項(xiàng)旋轉(zhuǎn),半透明4.0后版本
當(dāng)前位置:點(diǎn)晴教程→知識(shí)管理交流
→『 技術(shù)文檔交流 』
新版的c-lodop除了增加可以打印pdf的功能,還增加了一些其他功能,這里測(cè)試下增加的其中三個(gè)功能:單個(gè)打印項(xiàng)拉伸縮放,旋轉(zhuǎn),半透明。 <script language="javascript" src="LodopFuncs.js"></script> </head> <body> <p><a href="javascript:prn1_preview()">打印預(yù)覽(4.0后的縮放旋轉(zhuǎn)半透明)</a><br> <div style="line-height:25px"> <span style="background-color:#ffff99">打印預(yù)覽左上角是小打印機(jī)圖標(biāo),表明當(dāng)前使用的是c-lodop</span><br> c-lodop4.0后新增的部分功能:<br> 圖片旋轉(zhuǎn)-支持<br> 圖片半透明-支持<br> 純文本垂直水平縮放-支持<br> 純文本半透明-支持<br> 超文本垂直水平縮放-支持<br> </div> <script language="javascript" type="text/javascript"> var LODOP; //聲明為全局變量 function prn1_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_TEXT(27,29,100,20,"無樣式的純文本"); LODOP.ADD_PRINT_TEXT(71,29,199,20,"添加了垂直縮放1.5倍樣式的純文本"); LODOP.SET_PRINT_STYLEA(0,"ScalY",1.5);//純文本垂直縮放 LODOP.ADD_PRINT_TEXT(117,29,199,26,"添加了水平縮放1.5倍樣式的純文本"); LODOP.SET_PRINT_STYLEA(0,"ScalX",1.5);//純文本水平縮放 LODOP.ADD_PRINT_HTM(17,317,300,54,"<body>\r HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...</font>\r</body>"); LODOP.SET_PRINT_STYLEA(0,"ScalY",2.0);//超文本垂直縮放 LODOP.ADD_PRINT_HTM(172,317,300,54,"<body>\r HTML Demo content\r <br><font color=\"#FF0000\">Double click me and modify...</font>\r</body>"); LODOP.ADD_PRINT_IMAGE(200,10,200,200,"<img src='./lizi_images/wang1.jpg'>"); LODOP.SET_PRINT_STYLEA(0,"Stretch",2); LODOP.ADD_PRINT_IMAGE(352,251,200,200,"<img src='./lizi_images/wang1.jpg'>"); LODOP.SET_PRINT_STYLEA(0,"Stretch",2); LODOP.SET_PRINT_STYLEA(0,"Angle",80);//圖片旋轉(zhuǎn) LODOP.ADD_PRINT_IMAGE(302,442,200,200,"<img src='./lizi_images/wang1.jpg'>"); LODOP.SET_PRINT_STYLEA(0,"Stretch",2); LODOP.SET_PRINT_STYLEA(0,"Angle",80);//圖片旋轉(zhuǎn) LODOP.SET_PRINT_STYLEA(0,"Alpha",155);//圖片透明度 LODOP.ADD_PRINT_TEXT(193,402,100,41,"旺旺"); LODOP.SET_PRINT_STYLEA(0,"FontSize",25); LODOP.SET_PRINT_STYLEA(0,"Bold",1); LODOP.SET_PRINT_STYLEA(0,"Alpha",155);//純文本透明度 LODOP.PREVIEW(); }; </script> </body> 圖示: 該文章在 2023/9/25 23:03:21 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |