# Print Image from flash

**URL:** <https://forum.kirupa.com/t/print-image-from-flash/283659>\
**Category:** flash\
**Created:** [March 9, 2009, 7:35pm UTC](https://forum.kirupa.com/t/print-image-from-flash/283659 "2009-03-09T19:35:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evokenz](https://avatars.discourse-cdn.com/v4/letter/e/b2d939/32.png) [@evokenz](https://forum.kirupa.com/u/evokenz)\
**Post date:** [March 9, 2009, 7:35pm UTC](https://forum.kirupa.com/t/print-image-from-flash/283659/1 "2009-03-09T19:35:52Z")

</div>

I need to be able to print an image that has been externally loaded on to the stage…

I have no trouble printing text from an XML file, and I can also load the image, but for some reason it doesn’t want to print out…

```auto
public function finishPrint(select):void
        {
            
            var myPrintJob:PrintJob = new PrintJob();
            
            var printStart:Boolean = myPrintJob.start(); 
            
            var rectToPrint:flash.geom.Rectangle;
            
            var options:PrintJobOptions = new PrintJobOptions();
            
            var footer:TextField = new TextField();
            
            var txt:TextField = new TextField();
            
                        
                    options.printAsBitmap = true;
                    
                    sheet = new MovieClip();
                    
                    txt.styleSheet = css;
                    txt.height = 650;
                    txt.width = 500;
                    txt.wordWrap = true;
                    txt.htmlText = myXML.s13_4_1.text();
                    

                    footer.styleSheet = css;
                    footer.wordWrap = true;
                    footer.height = 150;
                    footer.width = 500;
                    footer.y = 730;
                    footer.htmlText = "<p><small>"+myXML.s13_8.FOOTER.text()+"</small></p>";
                    
                    loadIMG("images/image01.jpg");
                    
                    imageMc.cacheAsBitmap = true;
                    sheet.addChild(imageMc);
                    sheet.addChild(txt);
                    sheet.addChild(footer);

                    
                    rectToPrint = new Rectangle(-30,-10,880,800);
                    
                    addChild(sheet);
        
                    
                    if(printStart){
                    
                        try{
                            trace("printing...");        
                            myPrintJob.addPage(sheet,rectToPrint,options);
                            myPrintJob.send();
                        }
                        catch(error:Error){
                            trace(error);
                        }
        
                    }
 
            
            removeChild(sheet);
            myPrintJob = null;
            return;
        } 

```
