I am trying to create automatic export of panels to pictures. The panels have small sizes, they are associated with the hardware devices - device icons. As far as I know, the only way is to print panels into pdf (using printPanel()) and then convert into picture format. I have encountered 2 problems with printPanel function:
1. When printing panel in -silentMode, border is alaways on though the print option is PPO_NO_BORDER. The same panel opened in the UI manager and printed without silent mode has no border.
2. For printing it is possible to set .PrinterName - with two options - printer name or file name, but not both. When file name is used, how to redirect printing on specific pdf printer? When, for example, cutePdf writer is set as default printer, printing goes still to Microsoft print to pdf (Win10). The reason for redirection is that I am not able to set custom print sizes for Microsoft pdf.
Code: Select all
const string sUiDP = myUiDpName();
dpSetWait(sUiDP + ".Print.PrinterName:_original.._value", "file:///D:/icon_file.pdf",
sUiDP + ".Print.Landscape", false,
sUiDP + ".Print.Background", false,
sUiDP + ".Print.Scale", 0,
sUiDP + ".Print.FitToPage", false);
ret = printPanel(modulName,panelName,"panelOnly", PPO_NO_BORDER);