加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex学习——打印

发布时间:2020-12-15 04:11:30 所属栏目:百科 来源:网络整理
导读:Flex打印功能,可以采用其自身带的PrintJob类,当然这个比较简单也没有预览功能 (1)利用自带的PrintJob? public function doPrint():void? { var printJob:PrintJob = new PrintJob(); if (printJob.start())? { this.width=printJob.pageWidth; this.heig
Flex打印功能,可以采用其自身带的PrintJob类,当然这个比较简单也没有预览功能
(1)利用自带的PrintJob?
public function doPrint():void?
{
var printJob:PrintJob = new PrintJob();
if (printJob.start())?
{
this.width=printJob.pageWidth;
this.height=printJob.pageHeight;
var rent:Rectangle=new Rectangle();//打印范围
rent.x=120;
rent.y=30;
rent.height=700;
rent.width=1000;
var prj:PrintJobOptions=new PrintJobOptions();
prj.printAsBitmap=true;
this. canLeft.scaleX=0.6; this.canLeft.scaleY =1; printJob.addPage(this.canLeft,rent,prj); printJob.send(); this.canLeft.scaleX=1; this.canLeft.scaleY =1; this.percentHeight=100; this.percentWidth=100; } } canLeft为打印的容器

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读