PDF Concatenation Issue

We have a process to concatenate files to pdf.


To do this we are using the following code

Document pdfDocument = new Document();
pdfDocument.getPages().add(new Document(new FileInputStream(“SomeFile”).getPages())

We have run into a snag with a pdf that has crashed a server and the following stack was provided. Are there any thoughts on what might be causing this? Current deployed version is 11.3.0

<pre class=“event” style=“border-color: rgb(204, 204, 204); font-family: Consolas, Monaco, “Courier New”, monospace; font-size: 12px; color: rgb(51, 51, 51); margin-top: 0px; margin-bottom: 0px; zoom: 1; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);”>at com.aspose.pdf.internal.p112.z5.m4(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m2(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m4(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m2(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m4(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m2(Unknown Source)
at com.aspose.pdf.internal.p112.z5.m5(Unknown Source)
at com.aspose.pdf.internal.p112.z15$z1.m6(Unknown Source)
at com.aspose.pdf.internal.p112.z15$z1.<init>(Unknown Source)
at com.aspose.pdf.internal.p112.z21.m1(Unknown Source)
at com.aspose.pdf.internal.p112.z21.m1(Unknown Source)
at com.aspose.pdf.Signature.<init>(Unknown Source)
at com.aspose.pdf.PKCS7Detached.<init>(Unknown Source)
at com.aspose.pdf.SignatureField.<init>(Unknown Source)
at com.aspose.pdf.Field.m1(Unknown Source)
at com.aspose.pdf.PageCollection.m1(Unknown Source)
at com.aspose.pdf.PageCollection.m1(Unknown Source)
at com.aspose.pdf.PageCollection.m1(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)<pre class=“event” style=“border-color: rgb(204, 204, 204); font-family: Consolas, Monaco, “Courier New”, monospace; font-size: 12px; color: rgb(51, 51, 51); margin-top: 0px; margin-bottom: 0px; zoom: 1; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);”>
<pre class=“event” style=“border-color: rgb(204, 204, 204); font-family: Consolas, Monaco, “Courier New”, monospace; font-size: 12px; color: rgb(51, 51, 51); margin-top: 0px; margin-bottom: 0px; zoom: 1; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);”>

Hi there,


We are sorry for the inconvenience. I am afraid it is difficult to suggest you any thing without testing the scenario with source files at our end. We will appreciate it if you please share your sample documents here, we will look into it and will guide you accordingly.

Best Regards,