Getting IndexoutrangeException while merging


I am trying to merge two documents by using new aspose 19.2 evaluation version but getting below error while merging at the following line "mergedDoc.getPages().add(majorDoc.getPages()); "

code snippet :
Document majorDoc = new Document(majorDocFullPath);
Document childDoc = new Document(childDocFullPath);
Document mergedDoc = new Document();“Before merge ::”);

Error details:
Exception in thread “main” class com.aspose.pdf.exceptions.IndexOutOfRangeException: At most 4 elements (for any collection) can be viewed in evaluation mode.
com.aspose.pdf.ADocument.lf(Unknown Source)
com.aspose.pdf.PageCollection.lf(Unknown Source)
com.aspose.pdf.PageCollection.get_Item(Unknown Source)
com.aspose.pdf.PageCollection.lI(Unknown Source)
com.aspose.pdf.PageCollection.lI(Unknown Source)
com.aspose.pdf.PageCollection.add(Unknown Source)
at com.aspose.pdf.ADocument.lf(Unknown Source)
at com.aspose.pdf.PageCollection.lf(Unknown Source)
at com.aspose.pdf.PageCollection.get_Item(Unknown Source)
at com.aspose.pdf.PageCollection.lI(Unknown Source)
at com.aspose.pdf.PageCollection.lI(Unknown Source)
at com.aspose.pdf.PageCollection.add(Unknown Source)
at com.citigroup.contractuals.AsposeMerge.mergeFiles(
at com.citigroup.contractuals.AsposeMerge.main(


Thank you for contacting support.

You are facing evaluation version limitations. In order to test the API in its full capacity, you may apply a 30-days temporary license. You may request for temporary license on the given link and evaluate latest version of the API as per your requirements. Once you complete evaluation process, you may purchase the license to keep using APIs features. In case you face any issue, please feel free to let us know.