Update cookies preferences
Promotic

PrinterCfg - method of the Pm object

Description:
Displaying the printer selection and setup window.
Syntax:
Empty PrinterCfg(String sCfg, Function onComplete)
Parameters:
sCfg(String) The initial configuration data for the specific printer obtained earlier by the Pm.PrinterCfg method.
If configuration data is valid, then the printer will be selected in the window and will be preset according to the data contained.
This allows you to view or change the configuration data for a specific printer. Entries are in the KeyVal format.
onComplete(Function) The parameter onComplete contains a function that will be called for asynchronous handover of the result. The function must be in syntax: function onComplete(ev) {};
where the parameter ev.Value contains the returned value (result) of the asynchronous calling.
 
The result is printer-specific configuration data, that can be passed on when printing a panel directly on that particular printer. See PmgRoot.Print. Entries are in the KeyVal format.
Note:
This method is not functional in Web panels. This method is asynchronous.
Example:
Reading the initial configuration data for the printer from the INI file.
View and change the configuration data using the printer selection and setup window.
Save the modified configuration data back into the INI file.
JavaScriptSelect and copy to clipboard

function onComplete(ev)
{
if (Pm.StringLen(ev.Value) > 0)
{
Pm.IniFileWrite("#cfg:config.ini", "Printer", "printer1", ev.Value);
}
}

var sCfg = Pm.IniFileRead("#cfg:config.ini", "Printer", "printer1", "");
Pm.PrinterCfg(sCfg, onComplete);

History:
Pm9.00.25: Created
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- PrinterCfg
 
 
- Sin
- Tan
© MICROSYS, spol. s r.o.