LODOP整页缩放,宽度、高度溢出缩放
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
LODOP中,超文本超过打印项高度会自动分页,可以用语句进行缩放,让打印内容都在一页中。 <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()">打印预览整页缩放</a><br> <a href="javascript:prn3_preview()">打印预览宽度溢出缩放</a><br> <a href="javascript:prn4_preview()">打印预览高度溢出缩放</a><br> <script language="javascript" type="text/javascript"> var LODOP; //声明为全局变量 function prn1_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_LINE("34.4mm","82.81mm","34.1mm","101.31mm",0,1); LODOP.ADD_PRINT_URL(0,0,"100%","100%","http://www.c-lodop.com/index.html"); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn2_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_URL(0,0,"100%","100%","http://www.c-lodop.com/index.html"); LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT","Full-Page"); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn3_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_URL(0,0,"100%","100%","http://www.c-lodop.com/index.html"); LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; function prn4_preview() { LODOP=getLodop(); LODOP.PRINT_INIT(""); LODOP.ADD_PRINT_URL(0,0,"100%","100%","http://www.c-lodop.com/index.html"); LODOP.SET_PRINT_MODE("FULL_HEIGHT_FOR_OVERFLOW",true); LODOP.PRINT_DESIGN(); //LODOP.PREVIEW(); }; </script> </body> 图示: 该文章在 2023/9/25 22:25:17 编辑过 |
关键字查询
相关文章
正在查询... |