# Trying to print 3 windows with 1 Button

**URL:** <https://forum.inductiveautomation.com/t/trying-to-print-3-windows-with-1-button/21404>\
**Category:** Ignition\
**Created:** [December 13, 2018, 4:43pm UTC](https://forum.inductiveautomation.com/t/trying-to-print-3-windows-with-1-button/21404 "2018-12-13T16:43:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 13, 2018, 4:43pm UTC](https://forum.inductiveautomation.com/t/trying-to-print-3-windows-with-1-button/21404/1 "2018-12-13T16:43:18Z")

</div>

I need to print 3 windows with a single button press. The 3 windows are setup as tab style navigation. I’ve recycled the following code from the forum, and I wonder if I can iterate through the windows and create a single print job with all three windows in it. Note that I am using a print to PDF, not a real printer, and I want only 1 PDF file with 3 pages(one per window). Is this in the realm of possibility or just a pipe dream?

```auto
windowName = system.nav.getCurrentWindow()
try:
    rc = system.gui.getWindow(windowName).getRootContainer()
    job = system.print.createPrintJob(rc)
    job.setMargins(0.5)
    job.showPageFormat = 1
    job.orientation = 1
    job.print()
except:
    # window not opened
    pass

```

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [December 14, 2018, 6:59pm UTC](https://forum.inductiveautomation.com/t/trying-to-print-3-windows-with-1-button/21404/2 "2018-12-14T18:59:51Z")

</div>

If you can print them separately from one button, then as long as the pdf printer driver supports appending, then I would say yes, it would be possible.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 14, 2018, 7:17pm UTC](https://forum.inductiveautomation.com/t/trying-to-print-3-windows-with-1-button/21404/3 "2018-12-14T19:17:49Z")

</div>

Thanks for the reply. I’m going to do some further testing with this, but for now I’m going to stick with just one window printing, which should provide the bare minimum to get by with for now.
