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

Free Support Forum - aspose.com

Aspose PDF Java issue with PageCollection insert

We upgraded old pdf library (9.4.1 to 10.6.1) and the code is breaking

The code is simply inserting PDF pages to a new PDF, the code worked great in old library , in new one it does not even compile.

Document pdfDocument1 = new Document(inputStream1);
Document pdfDocument2 = new Document(inputStream2);
PageCollection pages1 = pdfDocument1.getPages();
PageCollection pages2 = pdfDocument2.getPages();
pages1.insert(1, pages2);

compile error thrown at inert()

"The method insert(int, Page) in the type PageCollection is not applicable for the arguments (int, PageCollection)"

The overloaded method we used originally was
public void insert(int pageNumber, Page[] pages);

Is there an issue with the method or should we change the code?

Hi David,

for using our API’s.

have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWJAVA-35164 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNEWJAVA-35164) have been fixed in Aspose.Pdf for Java 16.11.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.