We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to read and concatenate PDF files using iText

We are using ASPOSE PDF to read PDF files from a staging location and concatenate them as one large PDF file. The ASPOSE PDF merge operation worked well with the PDFs that were created using ADOBE PDF. However, the program hang when reading PDF files that were created using iText 2.0.2. The method openPdfFile() is not responding or throwing an exception. Does anyone have encountered a similar error or have experience with iText PDFs? Any insights on this is much appreciated.

Sample code

FileInputStream overlayInputStream = new
FileInputStream() ;

PdfViewer pdfViewer = new PdfViewer();


Hi there,

Thanks for your inquiry. We will appreciate if you please share your sample problematic PDF document here. We will look into it and guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Thanks for getting back. I have attached the PDF files below. If I open them using ADOBE and then save them, then the file works. We already have purchased the enterprise license for this product.


Thanks for getting back. PFA the file. When we open the file using Adobe and then save it we are not encountering the error. Looks like the PDF file was created using iTesxt 2.0.2. We already have an enterprise level licence from Asopse.


Hi Shiv,

Thanks for sharing source documents. I have tested the scenario using latest version of Aspose.Pdf for Java 10.6.1 and unable to notice any issue/exception. Please download and try latest versions of Aspose.Pdf for Java, it will resolves.

Moreover, please use bindPdf() metod instead openPdfFile().

FileInputStream fstream=new FileInputStream(myDir + “SBC+Cover+Letter_RTC-3771.pdf”);<o:p></o:p>

com.aspose.pdf.facades.PdfViewer pdfviewer = new com.aspose.pdf.facades.PdfViewer();

// open a Pdf file.




Please feel free to contact us for any further assistance.

Best Regards,

Thanks for the recommended solution. I was able to solve the problem using the latest version.


Hi Shiv,

Thanks for your feedback. It is good to know that you have manged to resolve the issue.

Please keep using Aspose.Pdf and feel free to contact us for any further query or concern, we will be more than happy to extend our support.

Best Regards,