ssCore.Printer.printImageFile

Send an external image file to the selected printer.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

path - Fully qualified path to an image to be printed. This parameter supports monikers.

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.

scaleFactor - [Optional] - A scale factor to be applied to the image before printing. If not specified or a negative value is used, the default scale factor of 1.0 will be used. Supplying a custom scale factor will disable the stretchToFit and fitToPage settings.


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.printImageFile( 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.printImageFile( paramsObject );


Notes:

None.


Examples:

ssCore.Printer.printImageFile({path:"startdir://file.jpg", fitToPage:true});