Would anyone be able to tell me why the following code creates a blank
page. I am using Flex 3 on Mac OS 10.5

I am able to add the custom printing compoent to the application, the
print dialog opens and it looks to be processing the print, however, I
am left with 2 blank pages when it is done. In addition, it crashes
Firefox when the print job is complete. I have added some of the ideas
presented in this group, however, can not seem to find any additional
information on the web about this problem. Has anyone overcome the issue.

The function I am using to print is as follows

private function printDailyManpowerList(event:MouseEvent):void {
                                var printJob:FlexPrintJob = new FlexPrintJob(); 
//create flex
print job
     if (printJob.start() != true){
        return;
     }
var dailyPrint:DailyManpowerListPrintView = new
DailyManpowerListPrintView(); //create new print component
                                this.parentApplication.addChild(dailyPrint);
printJob.addObject(dailyPrint);
callLater(printJob.send); //start print
this.parentApplication.removeChild(dailyPrint);//remove component from
container
                        }

The code for the DailyManpowerListPrintView is


<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml";
        xmlns:views="com.dynamicmedicalventures.De2ORApplication.views.*"
backgroundColor="#FFFFFF" width="500" height="900">
<mx:Script>
<![CDATA[
        import
com.dynamicmedicalventures.De2ORApplication.vo.CoordinatorMessageVO;
        import 
com.dynamicmedicalventures.De2ORApplication.model.AppModelLocator;
        import
com.dynamicmedicalventures.De2ORApplication.factories.UtilityFunctions;
        import mx.events.CloseEvent;
        import mx.managers.PopUpManager;
                        
        [Bindable]
        private var modelLocator:AppModelLocator = 
AppModelLocator.getInstance();
        [Bindable]
        public var messageDetails:CoordinatorMessageVO;
]]>
</mx:Script>

        <mx:Label id="printTitle" text="Daily Manpower List for
{UtilityFunctions.formatDateDisplay(modelLocator.selectedDate)}"/>
        <views:UserListPrint id="dailyUsers"
initialUserList="{modelLocator.dailyUserList}" width="100%"
height="50%" />
</mx:VBox>

Thanks for any help

Don




Reply via email to