November 14, 2021, 11:31pm
I’m having trouble with getting the print script to work,
job = system.print.createPrintJob(event.source.parent)
I’m running this script from within a configured event on a momentary.
I get the following error when I use the button in the designer preview mode:
Error running action ‘dom.onMouseDown’ on project/site/area/Processing Statistics/Components/PrinterButton@D$0:1/root/Button: AttributeError: ‘com.inductiveautomation.ignition.common.script.Imm’ object has no attribute ‘print’
That function is Vision Client scope only, you can’t use it in Perspective.
I’m not sure if it’s possible to capture a screenshot and print it from Perspective.
This would currently require a custom module - capturing screenshots from web browsers is a surprisingly complicated problem. Your best bet in the short term might be to try to train users to use built-in browser tools - new versions of Firefox, for instance, have a very powerful built in screenshotting tool.
What’s the use case of these screenshots, out of curiosity?
November 15, 2021, 1:47am
Thanks for your response,
Does that include a control+P type function? where the operators need to print to PDF or a local printer.
They can hit ctrl-P and let the browser print.
November 15, 2021, 2:32am
hahaha, that’s a fair point.
But I’m changing over a brownfields site from Factory Talk and they want the exact same functionality.
Vision may have been a better choice for 1:1 functionality. Building for the browser is a very different paradigm.
December 30, 2021, 2:24pm
Don’t hold your breath waiting for this. Browser security pretty much prohibits anything like it. Maybe possible in the future in Perspective Workstation.