Hello, I’ve sent this to support yesterday and no response yet… Just my totalcare notice that it’s due end of March… Kinda frustrating…
Anyway,I’ve tried :
system.report.executeAndDistribute(path=“Ticket DO2”, project=“NotcheuseSMI”, action=“print”, actionSettings = {“primaryPrinterName”:“SMITicket”}) on a Tag Change script. I have no error but it doesn’t print nothing. on my gateway server, nothing in print queue.
I’ve tried the script from Printing report to networked printer I’ve modified it to put the output to temp file because I don’t think there is a console for gateway scripts as follow:
for printer in printerList:
system.file.writeFile(tempFile, printer.getName(), 1)
The file was empty. The only possible reason that I can see is that the printer was just created and I need to reboot server or service? Since it’s a pain to reboot this server, I want to ask first, if it will help my cause. Or is there another reason?
To answer the title of your question, yes executeAndDistribute works on Linux.
Based on the text of your question, the real issue is that Java isn’t seeing your printer. After googling for a bit, it looks like you might be hitting a known Java issue – the work around is to reboot, open the printers control panel, and then start Ignition. Unfortunately, if Java can’t see the printer, then neither can Ignition. :\
So it’s either the lpr is somewhere else, and you need to create a symlink lpr to the actual location of lpr, or in my case, just nowhere to be found. Doing sudo apt-get install lpr will install a lpr, but that one will not work, as stated here:
To add to this solution, further down the road you might get a problem with the printer giving you a media error when you try to print. The solution is to force the driver to RAW with:
In some instance I had to reboot the server, and sometimes not. Guess it’s because I haven’t cancelled the print job in the queue before starting the procedure.