Print Screen Button

Hi,

I’m having trouble with getting the print script to work,

job = system.print.createPrintJob(event.source.parent)
job.setShowPrintDialog(0)
job.print()

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’

Regards,

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.

1 Like

Thanks for your response,

Does that include a control+P type function? where the operators need to print to PDF or a local printer.

Regards,

They can hit ctrl-P and let the browser print.

1 Like

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.

4 Likes

Don’t hold your breath waiting for this. Browser security pretty much prohibits anything like it. Maybe possible in the future in Perspective Workstation.

1 Like