User Guide

PrintJob.addPage() 391
// display print dialog box, but only initiate the print job
// if start returns successfully.
if (my_pj.start()) {
// use a variable to track successful calls to addPage
var pagesToPrint:Number = 0;
// add specified area to print job
// repeat once for each page to be printed
if (my_pj.addPage([params])) {
pagesToPrint++;
}
if (my_pj.addPage([params])) {
pagesToPrint++;
}
if (my_pj.addPage([params])) {
pagesToPrint++;
}
// send pages from the spooler to the printer, but only if one or more
// calls to addPage() was successful. You should always check for successful
// calls to start() and addPage() before calling send().
if (pagesToPrint > 0) {
my_pj.send(); // print page(s)
}
}
// clean up
delete my_pj; // delete object
You cannot create a second PrintJob object while the first one is still active. You cannot create a
second PrintJob object (by calling
new PrintJob()) while the first PrintJob object is still active,
the second PrintJob object will not be created.
Example
See PrintJob.addPage().
See also
PrintJob.addPage(), PrintJob.send(), PrintJob.start()
PrintJob.addPage()
Availability
Flash Player 7.
Usage
my_pj.addPage(target:Object [, printArea:Object] [, options:Object ] [,
frameNumber:Number]) : Boolean