# Merge pdf files

**URL:** <https://forum.inductiveautomation.com/t/merge-pdf-files/64850>\
**Category:** Ignition\
**Created:** [October 5, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850 "2022-10-05T14:35:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [October 5, 2022, 2:35pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/1 "2022-10-05T14:35:48Z")

</div>

I saw a post about combining two pdf files into one.  
Somme people recommended to use the PDFtk Server.

I looked for the information but I can't use the PDFtk Server.

I'am trying to do it but I can't find the solution.

Somme one have an example script to gather several pdf pages into one? .

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 5, 2022, 2:54pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/2 "2022-10-05T14:54:23Z")

</div>

> [@sebastien\_ng](#):
>
> but I can't use the PDFtk Server.

Why?

I use the command line tool from PDFtk Free. I don't have examples from within Ignition, but a typical command line would look like this:

```auto
pdftk A=SourceFile1.pdf B=SourceFile2.pdf cat A B output OutputFile.pdf

```

The `cat` verb accepts many variations to select page ranges, odd or even sets, and rotations.

---

<div class="post-metadata">

**Author:** ![sebastien\_ng](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sebastien_ng/32/55297_2.png) [@sebastien\_ng](https://forum.inductiveautomation.com/u/sebastien_ng)\
**Post date:** [October 5, 2022, 3:09pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/3 "2022-10-05T15:09:52Z")

</div>

Thank you . Yes it work good into windows. Now I'am trying to do it from ignition perspective

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 22, 2023, 4:04pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/6 "2023-10-22T16:04:43Z")

</div>

> [@Transistor](#):
>
> This looks like a spam posting.

~~It is not.~~ PDFtk is a legitimate command line tool whose open-source version is quite useful. It absolutely can be used with java's `ProcessBuilder` to manipulate PDF files on a gateway.

Edit: Ah, someone else already clipped the spam.

---

<div class="post-metadata">

**Author:** ![EMMANUEL\_TELLEZ](https://avatars.discourse-cdn.com/v4/letter/e/97f17d/32.png) [@EMMANUEL\_TELLEZ](https://forum.inductiveautomation.com/u/EMMANUEL_TELLEZ)\
**Post date:** [August 23, 2024, 8:15pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/8 "2024-08-23T20:15:22Z")

</div>

How can I install this toolkit into Ignition environment?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 23, 2024, 8:21pm UTC](https://forum.inductiveautomation.com/t/merge-pdf-files/64850/9 "2024-08-23T20:21:19Z")

</div>

Install PDFtk into your gateway, outside Ignition.

Use java's `ProcessBuilder` to execute that tool in the background on the gateway, capturing the `stdout` carrying the output PDF bytes.

I don't see any example on the forum, sorry. It's not simple enough to just whip one up for you.
