ssCore.Printer.printWindow

Captures and prints any rectangular area of the application window.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

x - [Optional] - X (left) coordinate (in pixels) of area to be printed.

y - [Optional] - X (top) coordinate (in pixels) of area to be printed.

width - [Optional] - Width (in pixels) of area to be printed.

height - [Optional] - Height (in pixesl) of area to be printed.

fitToPage - [Optional] - If TRUE, scales the image uniformly, up or down as necessary and maintains the original aspect ratio of the window. The image may not fill the entire printed page unless the aspect ratio of the window matches the page. If FALSE, the selected area is printed at actual size. Valid values include: true and false.

stretchToFit - [Optional] - If TRUE, the image will be scaled up or down as necessary to completely fill the printable page. The scaling is not uniform and the image may look 'distorted' as a result. The default value is FALSE. Valid values include: true and false.

center - [Optional] - A boolean value that determines whether the image will be centered within the current margins or aligned to the top and left margins (the default) Valid values include: true and false.

clientOnly - [Optional] - A boolean value that indicates whether the coordinates are relative to the client area or the entire application windw. This allows you to have a border on your window but still reference areas inside using the same coordinates system that Flash uses. Valid values include: true and false.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Printer.printWindow( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Printer.printWindow( paramsObject );


Notes:

None.


Examples:

ssCore.Printer.printWindow({x:50, y:10, width:300, height:150, center:true});