# Append page to already existing PDF?

**URL:** <https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443>\
**Category:** Classic Servoy\
**Created:** [September 13, 2006, 9:56pm UTC](https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443 "2006-09-13T21:56:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rarbuthnot](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rarbuthnot](https://forum.servoy.com/u/rarbuthnot)\
**Post date:** [September 13, 2006, 9:56pm UTC](https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443/1 "2006-09-13T21:56:53Z")

</div>

How would I go about appending a page to an already existing PDF document?

---

<div class="post-metadata">

**Author:** ![chartpacs](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@chartpacs](https://forum.servoy.com/u/chartpacs)\
**Post date:** [September 13, 2006, 10:27pm UTC](https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443/2 "2006-09-13T22:27:54Z")

</div>

Hello,

I eventually need to do this, too. In my case, I need to print a fax cover sheet and then combine that with a pdf that’s stored in the database. The pdf\_output plugin has a function called combinePDFDocuments. Here’s some sample code, so hopefully it will point you in the right direction:

```auto
var printedPDF = plugins.pdf_output.endMetaPrintJob(); // not bothering to list the other print steps
var storedPDF = globals.pdf_field // insert your dataprovider here

var pdfArray = new Array(printedPDF, storedPDF); // order counts here, so my fax cover page would be listed first
var comboPDF = plugins.pdf_output.combinePDFDocuments(pdfArray);

// do stuff with comboPDF, like add it as an email attachment

```

Please let us know how it goes.

---

<div class="post-metadata">

**Author:** ![rarbuthnot](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@rarbuthnot](https://forum.servoy.com/u/rarbuthnot)\
**Post date:** [November 17, 2006, 10:56pm UTC](https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443/3 "2006-11-17T22:56:11Z")

</div>

> chartpacs:  
> Hello,
> 
> I eventually need to do this, too. In my case, I need to print a fax cover sheet and then combine that with a pdf that’s stored in the database. The pdf\_output plugin has a function called combinePDFDocuments.

I don’t have this function under my pdf\_output plugin node.

Anyone know why?

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [November 20, 2006, 3:04pm UTC](https://forum.servoy.com/t/append-page-to-already-existing-pdf/6443/4 "2006-11-20T15:04:37Z")

</div>

The function is added to the plugin in Servoy 3.0 and you are likely working in 2.2.6 (we do not guarantee that plugins from 3.0.1 are working in 2.2.6 but it might be worth a try)
