功能介绍:利用lodop插件让页面旋转到指定的位置再进行打印!具体代码如下:
function MyPreview() { var LODOP=getLodop(); LODOP.PRINT_INIT(""); var strHTML=document.getElementsByTagName("html")[0].innerHTML; LODOP.ADD_PRINT_HTM(0,0,"100%","100%",strHTML); LODOP.NewPageA(); LODOP.ADD_PRINT_HTM(0,0,"100%","100%",strHTML); LODOP.SET_PRINT_STYLEA(2,"AngleOfPageInside",-90); LODOP.NewPageA(); LODOP.ADD_PRINT_HTM(0,0,"100%","100%",strHTML); LODOP.SET_PRINT_STYLEA(0,"AngleOfPageInside",90); LODOP.NewPageA(); LODOP.ADD_PRINT_HTM(0,0,"100%","100%",strHTML); LODOP.SET_PRINT_STYLEA(0,"AngleOfPageInside",180); //--右下角加个页号对象: LODOP.ADD_PRINT_TEXT(553,593,165,22,"右下脚的页号:第#页/共&页"); LODOP.SET_PRINT_STYLEA(0,"ItemType",2); LODOP.SET_PRINT_STYLEA(0,"Horient",1); LODOP.SET_PRINT_STYLEA(0,"Vorient",1); LODOP.PREVIEW(); };
lodop插件如何设置样式打印(去掉样式打印/引入样式打印)
标签: lodop功能, lodop插件, lodop页面旋转打印
上面是“lodop插件如何让页面整体旋转打印输出(顺时针旋转90度再打印)”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4153.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!