User Guide
PrintJob.addPage() 699
PrintJob.addPage()
Availability
Flash Player 7.
Usage
my_pj.addPage(target:Object [, printArea:Object] [, options:Object ] [,
frameNumber:Number]) : Boolean
Parameters
target
A number or string; the level or instance name of the movie clip to print. Pass a number
to specify a level (for example, 0 is the
_root movie), or a string (in quotation marks [""]) to
specify the instance name of a movie clip.
printArea An optional object that specifies the area to print, in the following format:
{xMin:topLeft, xMax:topRight, yMin:bottomLeft, yMax:bottomRight}
The coordinates you specify for printArea represent screen pixels relative to the registration
point of the
_root movie clip (if target = 0) or of the level or movie clip specified by target.
You must provide all four coordinates. The width (
xMax-xMin) and height (yMax-yMin) must
each be greater than 0.
Points are print units of measurement, and pixels are screen units of measurement; points are a
fixed physical size (1/72 inch), but the size of a pixel depends on the resolution of the particular
screen. You can use the following equivalencies to convert inches or centimeters to twips or points
(a twip is 1/20 of a point):
• 1 point = 1/72 inch = 20 twips
• 1 inch = 72 points = 1440 twips
• 1 cm = 567 twips
You can’t reliably convert between pixels and points; the conversion rate depends on the screen
and its resolution. If the screen is set to display 72 pixels per inch, for example, one point is equal
to one pixel.
Note: If you have previously used print(), printAsBitmap(), printAsBitmapNum(), or printNum() to
print from Flash, you might have used a
#b frame label to specify the area to print. When using the
addPage() method, you must use the printArea parameter to specify the print area; #b frame labels
are ignored.
If you omit the printArea parameter, or if it is passed incorrectly, the full Stage area of target is
printed. If you don’t want to specify a value for
printArea but want to specify a value for
options or frameNumber, pass null for printArea.
options An optional parameter that specifies whether to print as vector or bitmap, in the
following format:
{printAsBitmap:Boolean}
The default value is false, which represents a request for vector printing. To print target as a
bitmap, pass
true for printAsBitmap. Remember the following suggestions when determining
which value to use: