当前位置:软件学习 > Flash >>

flex如何实现横向打印

1. var thismc:Sprite=new Sprite();
2. thismc.width=stage.stageWidth;
3. thismc.height=stage.stageHeight;
4. thismc.x=0;
5. thismc.y=0;
6.

7. thismc.addChild(this.root);
8.

9. thismc.rotation = 90;
10. try{
11. var pj:PrintJob = new PrintJob(); //新建一个打印;
12. pj.start(); //弹出打印窗口;
13. thismc.width = pj.pageWidth; //先让对象适应纸张的宽度;
14. thismc.scaleY = thismc.scaleX; //按比例调节高度;
15. pj.addPage(thismc); //添加打印页;
16. pj.send(); //打印;
17. }catch (err:Error) {}
18. thismc.rotation = 0; //打印完毕,恢复

补充:flash教程,As3.0
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,