Hi
I would like to make screen capture button which capture hole screen including navigation bars to image file.
I can make this with system.print.printToImage function but it needs container name and I want to include all containers from all windows?
Maybe there is better way to do this?
Br
Tommi Vahtera
The following code prints anything displayed in Ignition. It essentially grabs the frame that holds everything, and prints it.
obj = system.gui.getParentWindow(event) .parent
printJob = system.print.createPrintJob(obj)
printJob.showPrintDialog = 0
printJob.orientation = system.print.LANDSCAPE
printJob.print()
2 Likes
Robert
September 15, 2010, 6:53pm
4
Thanks Kyle,
I’ll have to bookmark this.
HALW80
December 20, 2012, 4:37pm
5
super, this is just what I was looking for too
Does this still work for Ignition 8.0?
I get errors on line three saying " showprintdialog" does not exist...
https://docs.inductiveautomation.com/display/DOC80/system.print.createPrintJob
Looks like it has changed to “.setShowPrintDialog(Boolean)”
Orientation also changed, “.setOrientation(int)”
obj = system.gui.getParentWindow(event) .parent
printJob = system.print.createPrintJob(obj)
printJob.setShowPrintDialog(0)
printJob.setOrientation(0)
printJob.print()
@PLCINC_NY , I just tested the original script, it still works perfectly fine. What are you getting for an error?
@bkthomas , nothing has changed. setShowPrintDialog(val) and showPrintDialog = val are the same thing.
Yes.
The “setShowPrint(val)” & "setOrientation(0)
all worked well .
printJob.showPrint = val and printJob.orientation = val will also work.
1 Like
PGriffith
Split this topic
January 24, 2022, 3:19pm
11
2 posts were split to a new topic: System.print in Perspective