This method might help you
protected function getComponentBitmap(target:IUIComponent,
transparent:Boolean = false):IUIComponent
{
var bitmapData:BitmapData = new BitmapData(
Math.round(target.width / target.scaleX),
Math.round(target.height / target.scaleY),
transparent);
bitmapData.draw(target);
var bitmap:Bitmap = new Bitmap(bitmapData);
var bitmapHolder:UIComponent = new UIComponent();
bitmapHolder.addChild(bitmap);
return bitmapHolder;
}
Peace, Mike
this print example is from the Flex help it just prints the text
what i want is to print the image on my swfLoader or mx:image component
any one know how to do it i already try the live docs UICOMPONENT class but don't know which one is it
import mx.printing.FlexPrintJob;
import MyPrintView;
private function copyToClipboard(e:Event):void{
System.setClipboard(this.areaDeTexto.text);
}
public function doPrint():void {
// Create a FlexPrintJob instance.
var printJob:FlexPrintJob = new FlexPrintJob();
// Start the print job.
if(printJob.start()) {
// Create a MyPrintView control as a child of the current view.
var formPrintView:MyPrintView = new MyPrintView();
addChild(formPrintView);
// Populate the print control's Name label with the text from
// the form's Name controls.
formPrintView.nombre.text = "" + Nombre.text + " "
// Set the print control's textArea data provider to be
// the displayed textArea's data provider.
formPrintView.contenido.text = areaDeTexto.text;
formPrintView.foto.data= "">
// Add the SimplePrintview control to the print job.
// For comparison, try setting the second parameter to "none".
printJob.addObject(formPrintView);
// Send the job to the printer.
printJob.send();
// Remove the print-specific control to free memory.
removeChild(formPrintView);
}
}
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to