# combinePDFDocuments not working

**URL:** <https://forum.servoy.com/t/combinepdfdocuments-not-working/6751>\
**Category:** Classic Servoy\
**Created:** [November 16, 2006, 8:16pm UTC](https://forum.servoy.com/t/combinepdfdocuments-not-working/6751 "2006-11-16T20:16:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gstein](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gstein](https://forum.servoy.com/u/gstein)\
**Post date:** [November 16, 2006, 8:16pm UTC](https://forum.servoy.com/t/combinepdfdocuments-not-working/6751/1 "2006-11-16T20:16:18Z")

</div>

I am trying to use the combinePDFDocuments method of the pdf\_output plugin, but its not working.

Here is some sample code. If I run it and output either of the array values I get the file fine, but if I pass the array to the pdf\_output.combinePDFDocuments I get a zero byte file.

```auto
var pdfArray = new Array(1);
pdfArray[0] = application.readFile("c:/data/aibs/peer/pdf/CarRegistration.pdf")
pdfArray[1] = application.readFile("c:/data/aibs/peer/pdf/ConflictHonorariaForm.pdf")
var pdfSummaryFile = plugins.pdf_output.combinePDFDocuments(pdfArray);
var success = plugins.file.writeFile("c:/data/aibs/peer/pdf/Summary.pdf", pdfSummaryFile);
plugins.dialogs.showInfoDialog( "Status", success)

```

Can anyone tell me what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![automazione](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@automazione](https://forum.servoy.com/u/automazione)\
**Post date:** [November 16, 2006, 10:22pm UTC](https://forum.servoy.com/t/combinepdfdocuments-not-working/6751/2 "2006-11-16T22:22:23Z")

</div>

Just tried with your code here and worked OK here on:

Servoy Developer  
Version 3.0.1-build 372  
Java version 1.5.0\_04-b05 (Windows XP)

maybe you are short of memory… have you tried with two small pdf?.
