# Print button script

**URL:** <https://forum.inductiveautomation.com/t/print-button-script/10113>\
**Category:** Ignition\
**Created:** [June 9, 2015, 8:57pm UTC](https://forum.inductiveautomation.com/t/print-button-script/10113 "2015-06-09T20:57:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 9, 2015, 8:57pm UTC](https://forum.inductiveautomation.com/t/print-button-script/10113/1 "2015-06-09T20:57:26Z")

</div>

hi, I have a print button inside a container with a script to print all elements:

```auto
job = system.print.createPrintJob(event.source.parent)
job.setMargins(0.5)
job.zoomFactor = 0.75
job.showPageFormat = 0

job.print()
```

This print all the elements, including the print button, but I don’t want this button appears.  
I trying to put this button outside the container but then I don’t know what to write inside the

```auto
system.print.createPrintJob( )
```

---

<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:** [June 9, 2015, 9:56pm UTC](https://forum.inductiveautomation.com/t/print-button-script/10113/2 "2015-06-09T21:56:23Z")

</div>

```auto
job = system.print.createPrintJob(event.source.parent.getComponent('PrintableContainer'))
```

Here’s a tip: you can browse through the property tree to get to the component. You can’t pick the component itself, but you can pick any property it has (for example ‘Name’). You get this:

```auto
job = system.print.createPrintJob(event.source.parent.getComponent('PrintableContainer').name)
```

Now, you can go back and delete the “.name” portion (including the period), and you’re good to go!

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [June 9, 2015, 11:19pm UTC](https://forum.inductiveautomation.com/t/print-button-script/10113/3 "2015-06-09T23:19:56Z")

</div>

Thanks Jordan, that worked.
