# Printing Multiple Containers

**URL:** <https://forum.inductiveautomation.com/t/printing-multiple-containers/4749>\
**Category:** Ignition\
**Created:** [July 2, 2012, 8:22pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749 "2012-07-02T20:22:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 8:22pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/1 "2012-07-02T20:22:13Z")

</div>

Is it possible to print multiple containers at one time?

If so what would the syntax look like?

Such as:

job = system.print.createPrintJob(event.source.parent.getComponent(‘Container\_Page1’)) and  
system.print.createPrintJob(event.source.parent.getComponent(‘Container\_Page2’)) and  
system.print.createPrintJob(event.source.parent.getComponent(‘Container\_Page3’)) and  
system.print.createPrintJob(event.source.parent.getComponent(‘Container\_Page4’))  
job.setMargins(0.5)  
job.zoomFactor = -1.0  
job.orientation = system.print.LANDSCAPE  
job.showPageFormat = 0  
job.print()

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 2, 2012, 8:39pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/2 "2012-07-02T20:39:24Z")

</div>

You can print the root container which contains each sub container. The print function only takes a single component.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 8:41pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/3 "2012-07-02T20:41:16Z")

</div>

if I print the root container then i can’t read the other containers because they are too small. I have sized the containers to fit the paper size.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 8:48pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/4 "2012-07-02T20:48:10Z")

</div>

If there a way to print multiple pages of the root container?

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [July 2, 2012, 10:07pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/5 "2012-07-02T22:07:12Z")

</div>

Do you mean have one container spread out over multiple pages? If so, that can’t be done, as the system.print.createPrintJob() only handles putting components into one page. There is probably a way it can be done using Java’s API. For more information about using Java in Ignition:

[inductiveautomation.com/support/ … g\_java.htm](http://inductiveautomation.com/support/usermanuals/ignition/accessing_java.htm)

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 10:56pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/6 "2012-07-02T22:56:21Z")

</div>

Root Container is 1280 x 3000, so it is too big to print on one page .

---

<div class="post-metadata">

**Author:** ![Michael.Stofan](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.stofan/32/3342_2.png) [@Michael.Stofan](https://forum.inductiveautomation.com/u/Michael.Stofan)\
**Post date:** [July 2, 2012, 11:45pm UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/7 "2012-07-02T23:45:57Z")

</div>

Another method would be sequentially printing several containers one after the other. That would be much simpler than messing about with the Java print API…

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 3, 2012, 12:34am UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/8 "2012-07-03T00:34:19Z")

</div>

I am already doing this.

See previous post !

Can this be done without having to click the printer button 4 times?

---

<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:** [July 3, 2012, 11:53am UTC](https://forum.inductiveautomation.com/t/printing-multiple-containers/4749/9 "2012-07-03T11:53:50Z")

</div>

If you are just sending things to the default printer, then you can turn off the dialog box with the showPrintDialog switch:

[code]job = system.print.createPrintJob(event.source.parent)  
job.setMargins(0.5)  
job.zoomFactor = 0.75  
job.showPageFormat = 0

job.showPrintDialog = 0

job.print()[/code]

Perhaps if you had phrased the part about not wanting to hit the print button… 😉

Of course, if there was a handy append method, that would be cool.
