# How to get full screen on System.print.printToImage?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197>\
**Category:** Ignition\
**Created:** [September 15, 2010, 7:46am UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197 "2010-09-15T07:46:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [September 15, 2010, 7:46am UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/1 "2010-09-15T07:46:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [September 15, 2010, 8:26am UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/2 "2010-09-15T08:26:38Z")

</div>

The following code prints anything displayed in Ignition. It essentially grabs the frame that holds everything, and prints it.

```auto
obj = system.gui.getParentWindow(event) .parent
printJob = system.print.createPrintJob(obj) 
printJob.showPrintDialog = 0
printJob.orientation = system.print.LANDSCAPE
printJob.print()
```

---

<div class="post-metadata">

**Author:** ![vahterto](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vahterto](https://forum.inductiveautomation.com/u/vahterto)\
**Post date:** [September 15, 2010, 11:25am UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/3 "2010-09-15T11:25:16Z")

</div>

Thanks, works nice !

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [September 15, 2010, 6:53pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/4 "2010-09-15T18:53:04Z")

</div>

Thanks Kyle,

I’ll have to bookmark this.

---

<div class="post-metadata">

**Author:** ![HALW80](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@HALW80](https://forum.inductiveautomation.com/u/HALW80)\
**Post date:** [December 20, 2012, 4:37pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/5 "2012-12-20T16:37:09Z")

</div>

super, this is just what I was looking for too 😃

---

<div class="post-metadata">

**Author:** ![PLCINC\_NY](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/plcinc_ny/32/20350_2.png) [@PLCINC\_NY](https://forum.inductiveautomation.com/u/PLCINC_NY)\
**Post date:** [January 8, 2020, 6:00pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/6 "2020-01-08T18:00:30Z")

</div>

> [@Kyle\_Chase](#):
>
> obj = system.gui.getParentWindow(event) .parent printJob = system.print.createPrintJob(obj) printJob.showPrintDialog = 0 printJob.orientation = system.print.LANDSCAPE printJob.print()

Does this still work for Ignition 8.0?

I get errors on line three saying " showprintdialog" does not exist...

---

<div class="post-metadata">

**Author:** ![bkthomas](https://avatars.discourse-cdn.com/v4/letter/b/7ab992/32.png) [@bkthomas](https://forum.inductiveautomation.com/u/bkthomas)\
**Post date:** [January 8, 2020, 6:15pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/7 "2020-01-08T18:15:02Z")

</div>

[https://docs.inductiveautomation.com/display/DOC80/system.print.createPrintJob](https://docs.inductiveautomation.com/display/DOC80/system.print.createPrintJob)

Looks like it has changed to “.setShowPrintDialog(Boolean)”  
Orientation also changed, “.setOrientation(int)”

```auto
obj = system.gui.getParentWindow(event) .parent
printJob = system.print.createPrintJob(obj) 
printJob.setShowPrintDialog(0)
printJob.setOrientation(0)
printJob.print()

```

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 9, 2020, 3:49pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/8 "2020-01-09T15:49:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![PLCINC\_NY](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/plcinc_ny/32/20350_2.png) [@PLCINC\_NY](https://forum.inductiveautomation.com/u/PLCINC_NY)\
**Post date:** [January 9, 2020, 6:38pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/9 "2020-01-09T18:38:27Z")

</div>

Yes.  
The “setShowPrint(val)” & "setOrientation(0)

all worked well .

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 9, 2020, 9:53pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/10 "2020-01-09T21:53:32Z")

</div>

printJob.showPrint = val and printJob.orientation = val will also work.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 24, 2022, 3:19pm UTC](https://forum.inductiveautomation.com/t/how-to-get-full-screen-on-system-print-printtoimage/2197/11 "2022-01-24T15:19:09Z")

</div>

2 posts were split to a new topic: [System.print in Perspective](https://forum.inductiveautomation.com/t/system-print-in-perspective/55307)
