user1379077
user1379077

Reputation: 23

How to hide print dialog box in Flex?

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

Upvotes: 1

Views: 993

Answers (1)

radz
radz

Reputation: 26

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

Upvotes: 1

Related Questions