i m not getting you properly. If you can provide me the
code then it will be great.
please look at the code:
var printJob:PrintJob = new PrintJob();
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = false;
var tmsAnalysisDashboard : TmsAnalysisDashboard = (rightPanel.tabNavigator.selectedChild as ReportTabContainer).getChildAt(0) as
// drilldown_comp is the Accordian which we are go going to print, The height of this component will go beyond 2500px.
var drilldown_comp:DrillDownComponent = tmsAnalysisDashboard.middleCont.removeChildAt(0) as DrillDownComponent;
// i need to add this component to top most chuild of the stage since this gets masked by other components when printing.
var pageHeight:int = printJob.pageHeight;
var pageWidth:int = printJob.pageWidth;
var paperHeight:int = printJob.paperHeight;
var paperWidth:int = printJob.paperWidth;
// to calculate no of pages ... here it is 2500/800. numpages=4
numPages = Math.ceil(tmsAnalysisDashboard.drildown.height/printJob.pageHeight);
tmsAnalysisDashboard.drildown.scaleY = tmsAnalysisDashboard.drildown.scaleX;
/* Add pages to print job */
for (var i:int = 0; i < numPages; i++)
var printArea:Rectangle = new Rectangle(-60,-50,pageWidth,pageHeight);
printArea.y += printArea.height;
/* Send print job to printer */
// after printing is done the component is removed from the stage and is put back to the original parent.
Hope you understand the code!
Here i need to print that component with header and footer on all the pages.