ssCore.Printer.setProperties

Change the properties of the selected printer and/or change the selected printer at the same time. If a selected printer is specified the properties of that printer (not the currently selected printer) are changed.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

fontName - [Optional] - Name of the font that should be used to render text passed to Printer.printText.

fontSize - [Optional] - Size of the font that should be used to render text passed to Printer.printText.

paperOrientation - [Optional] - New paper orientation for the selected printer. Valid values include: landscape and portrait.

copies - [Optional] - Number of copies that should be printed.

topMargin - [Optional] - New top margin setting (in inches) for the selected printer.

leftMargin - [Optional] - New left margin setting (in inches) for the selected printer.

bottomMargin - [Optional] - New bottom margin setting (in inches) for the selected printer.

rightMargin - [Optional] - New right margin setting (in inches) for the selected printer.

selectedPrinter - [Optional] - Name of the new selected printer (must be one of the values returned by Printer.getPrinterList).


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


Notes:

None.


Examples:

ssCore.Printer.setProperties({
    fontName:"Times New Roman",
    fontSize:"12",
    paperOrientation:"portrait",
    copies:"10",
    selectedPrinter:"HP LaserJet 1200 Series PCL 6"
});