Hi Aspose Team,
We are experiencing an issue with out micropdf service. The PDF service returns a multipart response - it includes the PDF as one part, and some metadata about the PDF in another part. The metadata contains information about the PDF, including the number of pages within it.
For some reason, our file.xlsx, the PDF microservice generates a PDF with 9 pages (if you view it in a PDF viewer) but the meta data says it has 10 pages. When our product reads this metadata, ultimately it results in the IndexOutOfBoundsException in the server logs, because it attempts to read a 10th page that is not actually in the PDF.
The microservice uses the Aspose SheetRender API to count the pages in the spreadsheet (see ExcelToPdfBase.java line 72), rather than counting the number of pages in the actual PDF. This is the same algorithm as E-WorkBook as far as I can tell. For some reason, using the Aspose SheetRender API gives a different number of pages than in the actual PDF generated by Aspose
If we open the file in Excel, make no changes and immediately Save As… to create a copy, then the copy opens just fine in the product.
We would appreciate if you could investigate into this issue as to possible causes.