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

Free Support Forum - aspose.com

Reading Fonts from PDF leads to StackOverflowError


I use Aspose.PDF for Java 20.8 and when I read the fonts from the attached pdf-file Sperre Gehsteig.pdf (113.3 KB)
, a StackOverflowError is thrown:

Document document = new Document(new ByteArrayInputStream(this.sourceContent));
Font[] fontArr = document.getFontUtilities().getAllFonts(); // --> leads to java.lang.StackOverflowError

Please have a look at this problem, kind regards!


We were able to replicate the issue in our environment while using Aspose.PDF for Java 20.9. Therefore, have logged it as PDFJAVA-39794 in our issue management system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello, do you have any news on this case?


The issue has already been escalated to the priority support and is currently under the phase of investigation. You will surely be informed in respective helpdesk ticket as soon as the investigation is complete and some news about fix ETA is available. Please spare us some time.

The issues you have found earlier (filed as PDFJAVA-39794) have been fixed in Aspose.PDF for Java 21.8.