nAttr | [optional] (Long) Parameter specifies whether the panel will be printed
0 (default) - by new method
1 - by old method |
---|---|
sOptions | [optional] (String) Additional parameters that define the way of printing (crop, etc.).
If not set, then the whole panel is printed with default setting. The value of the sOptions parameter is taken also from the static default object setting, see sFramePars default value. Entries are in the KeyVal format, for example "x:0;y:0;dx:300;dy:200;printer:select;printzoom:0;". "x:nn;" (optional) - x-position of the left upper corner of the cutout (in pixels, default 0).
"y:nn;" (optional) - y-position of the left upper corner of the cutout (in pixels, default 0).
"dx:nn;" (optional) - Size of the x-crop (in pixels, default 0 = the whole panel).
"dy:nn;" (optional) - Size of the y-crop (in pixels, default 0 = the whole panel).
"printer:xx;" (optional) - It allows to select and configure the printer for printing.
select (default) - The system window will be displayed for selection and for printer setup.
default - Print will be executed on default Windows OS printer.
file:filepath - The file name with the path (*.bmp, *.png, *.jpg, *.gif or *.tif), where the panel or its portion will be saved. The file extension specifies the graphic format. It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files or folders. The resulting size of the image in the file is determined by the size of the panel or the selected portion.
{printercfg} - The configuration data of the specific printer obtained by the Pm.PrinterCfg method. Entries are in the KeyVal format. "printzoom:nn;" (optional) - The resulting size of the image in the file is determined by the size of the panel or the selected portion. |
sParams | [optional] (String) It allows to set the value of parameters of the PmgRoot object.
This parameter is then accessible in configurators of the panel by means of the Macro expression $.par and in the script by the GetPar method. Each parameter here consists of an identifier (name) and a value. Syntax: "pars:{name1:value1;name2:value2; ...}". See also: Parameters of the Pmg object. The value of the sParams parameter is taken from the default static object setting. See sViewPars default value. |
var b = pMe.Pm("/panel").Print();
var b = pMe.Pm("/panel").Print(0, "x:100;y:100;dx:300;dy:200;");
var b = pMe.Pm("/panel").Print(0, "printer:file:#temp:Img/panel.png;");
var b = pMe.Pm("/panel").Print(0, "printer:file:c:/Images/panel.png;");