Adding pages to a print job

You add pages to your print job with the PrintJob.addPage() method. Although the method can include up to four parameters, the only required parameter is target/level. The three optional parameters are printArea, options, and frameNum.

If you are not using a particular optional parameter but are using other optional parameters, use NULL in place of the excluded optional parameter.

With all four parameters, the function uses the following syntax:

MyPrintJob.addPage(target[,printArea:Object, options:Object, frameNum:Number]):boolean;

If you provide an invalid parameter, the print job uses default parameter values, which are specified in the sections that follow.

Each call to add a new page is unique, which allows you to modify parameters without affecting previously set parameters. For example, you can specify that one page print as a bitmap image, and another page print as a vector graphic. You can add as many new pages to your print job as the print job requires. One call to add a page equals one printed page.

Note: Any ActionScript that needs to be called to change a resulting printout must run before the PrintJob.addPage() method is called. The ActionScript can, however, run before or after a new PrintJob(). If a frame has a call to the PrintJob.addPage() method, the call itself does not guarantee that the ActionScript script on that frame will run when that frame is printed.