I would like to create a generic "screen print" module for my 
application. I have it working mostly. I can select print from the 
menu bar and it will render the module with focus.

I was feeling giddy when I got that to work and I decided to add a 
heading to the page that prints. I have an object (hbox) on my screen 
that would look good as a heading, so I did an addObject. This of 
course creates a new page. After searching around for a solution I 
decided that I will ask the assembled masses, and go to bed.

How can I merge multiple items onto a single page?

In this case I have a Panel and a HBox. I would like the HBox on top, 
a small gap and then the panel.

Below is the code that doesn't work;

private function PrintPanel():void
{
        var dspChildWithFocus:Object = this.getChildAt
(this.numChildren -1);
        var strPrintObject:String = 
dspChildWithFocus.child.strPrintObject

    // Create an instance of the FlexPrintJob class.
    var printJob:FlexPrintJob = new FlexPrintJob();
        printJob.printAsBitmap = true;

    // Start the print job.
    if (printJob.start() != true) return;

    // Add the object to print. Scale to fit the width
    printJob.addObject(hbMainTitle, 
FlexPrintJobScaleType.MATCH_WIDTH);
    printJob.addObject(dspChildWithFocus.child[strPrintObject], 
FlexPrintJobScaleType.MATCH_WIDTH);

    // Send the job to the printer.
    printJob.send();

}

Anoter related question - I haven't tried to print this on a real 
printer yet (I am working remotely with no shared printer) only pdf. 
Will I have problems with printing outside the printable area of the 
printer?

Paul

Reply via email to