lodop插件如何让页面整体旋转打印输出(顺时针旋转90度再打印)
功能介绍:利用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插件如何让页面整体旋转打印输出(顺时针旋转90度再打印)”的全面内容,想了解更多关于 前端知识 内容,请继续关注编程基础学习网。