You can do printing with dynamic images, you just have to wait until the images 
are loaded before adding them to the printjob.  Listen for the Event.COMPLETE 
event to know when the images are loaded.  I am doing it and it works fine.

--- In flexcoders@yahoogroups.com, "bnuenemann" <bened...@...> wrote:
>
> Thanks for this, but the images are embedded.
> 
> In my sample i use the same image (and same path). I can see the
> images, if i donĀ“t remove the child. But the images disappear at printing.
> 
> Do you have working code with embedded images?
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "nathanpdaniel" <ndaniel@> wrote:
> >
> > Using the PrintView "component", you have to embed images for them 
> > to show up.  I also asked the same question, but no one has ever 
> > come up with a good solution.  So it works fine if you have static 
> > images, but trying to load them dynamically will never work with 
> > what's available now! :D  Hope this helps!
> > 
> > --- In flexcoders@yahoogroups.com, "bnuenemann" <benedikt@> wrote:
> > >
> > > here my problem:
> > > 
> > > ------------ File: printimage.mxml ---------------
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > > layout="absolute" >
> > > <mx:Script>
> > > <![CDATA[
> > >  import mx.core.*;
> > >  import mx.printing.*;
> > >  public function doPrint():void {
> > >     var printJob:FlexPrintJob = new FlexPrintJob();
> > >     if (printJob.start()) {
> > >         var thePrintView:PrintView = new PrintView();
> > >         addChild(thePrintView);
> > >         printJob.addObject(printcontainer); // works fine     
> > >         printJob.addObject(thePrintView);  //will show second page
> > > without images
> > >         removeChild(thePrintView);
> > >     }
> > >     printJob.send();
> > >     }
> > >  }
> > > <mx:Canvas backgroundColor="#ffffff" id="printcontainer" 
> > width="100"
> > > height="100">
> > >   <mx:Image width="100" height="100" source="myimage.png"/>
> >     
> > > </mx:Canvas>
> > > <mx:Button label="Print" click="doPrint()" />
> > > </mx:VBox>
> > > </mx:Application>
> > > ------------ File: PrintView.mxml ---------------
> > > <?xml version="1.0"?>
> > > <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; 
> > > backgroundColor="#ffffff" 
> > >   height="650" width="550" paddingTop="50" paddingBottom="50"
> > > paddingLeft="50">
> > >  <mx:VBox width="500">
> > >           <mx:Image width="100" height="100" source="myimage.png"/>
> > >  </mx:VBox>
> > > </mx:VBox>
> > > 
> > > 
> > > If i add the image without the printview-template the images (jpg,
> > > gif, png) are visible, but with the PrintView it will show only 
> > white
> > > space on the print-output.
> > > 
> > > Any suggestions?
> > >
> >
>


Reply via email to