如何在 Flex 中隐藏打印对话框? [英] How to hide print dialog box in Flex?

查看:30
本文介绍了如何在 Flex 中隐藏打印对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 flex 中隐藏打印对话框?我正在使用 FlexPrintJob 类.

Is it possible to hide the printing dialog in flex? I'm using the class FlexPrintJob.

这是我的代码:

var print:FlexPrintJob = new FlexPrintJob();
print.printAsBitmap = true;

if ( print.start() ) {  
 print.addObject( img as UIComponent, FlexPrintJobScaleType.SHOW_ALL );
 print.send();
}

推荐答案

您可以使用 printjobs 类中的 start2()

you can use start2() from the printjobs class

 import flash.printing.PrintJob;
 import flash.printing.PrintUIOptions;

 var myPrintJob:PrintJob = new PrintJob();
 var uiOpt:PrintUIOptions = new PrintUIOptions();
 uiOpt.minPage = 1;
 uiOpt.maxPage = 3;
 var accepted:Boolean = myPrintJob.start2(uiOpt);

这篇关于如何在 Flex 中隐藏打印对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆