printSheetArr = new Array();
totalPageToPrint=printArr.length;
this.addEventListener(Event.ENTER_FRAME,printAllPages);
for(var j=0;j<printArr.length;j++)
{
var imag:Image = new Image();
imag.visible = false;
imag.load(printArr[j].swf);
imag.addEventListener(Event.COMPLETE,addAllToPrint);
printSheetArr.push( imag );
Application.application.addChild( imag );
}
var pj:FlexPrintJob = new FlexPrintJob();
var pagesToPrint:uint = 0;
if(pj.start())
{
try
{
for(var i : int=0;i<totalPageToPrint;i++)
{
pj.addObject( printSheetArr[i] as UIComponent,
FlexPrintJobScaleType.SHOW_ALL);
}
pagesToPrint++;
}
catch(e:Error)
{
}
if(pagesToPrint > 0)
{
pj.send();
}
first crate the array of pages u want to print then add them into the
printjob
On Tue, Jun 15, 2010 at 2:10 AM, Tharage Ntakadzeni
<[email protected]>wrote:
> Try to specify de width n height of ur canvas/page
>
> On 6/14/10, rodolfo oliveira <[email protected]> wrote:
> > Hey man.. you can use something like this
> >
> > private function printSomeThing():void{
> > var printJob:FlexPrintJob = new FlexPrintJob();
> > if(printJob.start()) {
> > printJob.addObject(pritnThis);
> > printJob.printAsBitmap = true;
> > printJob.send();
> >
> > }
> > }
> >
> > remember the *"pritnThis"* is the name of you print area..
> > bye
> >
> >
> >
> >
> > 2010/6/14 abhishekchess1 <[email protected]>
> >
> >> hey frnds,
> >> i want to print 3 canvas with data but it not showing anything in
> >> print.
> >> i used printjob.addPage method 3 times to add each canvas in it.
> >> Is anything more needed to print multiple pages?
> >> thx in advanced,
> >> :)
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Flex India Community" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<flex_india%[email protected]>
> <flex_india%[email protected]<flex_india%[email protected]>
> >
> >> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/flex_india?hl=en.
> >>
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Flex India Community" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<flex_india%[email protected]>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/flex_india?hl=en.
> >
> >
>
> --
> Sent from my mobile device
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.