How to hide print dialog box in Flex?

∥☆過路亽.° 提交于 2019-12-31 04:41:47

问题


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

Here's my code:

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

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

回答1:


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);


来源:https://stackoverflow.com/questions/10477703/how-to-hide-print-dialog-box-in-flex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!