Stackoverflow while processing user uploaded PDF

Hello Support,

We are encountering an issue when iterating through a pdf and loading content page by page. In the end we are merging multiple documents together, but this is the simplest way to reproduce the issue. Code shown below.

The specific pdf that causes the issue is attached – it has a recursive link in it which generates a stack overflow exception, which in turns leads to an application crash since we cannot catch it (StackOverflowException Class (System) | Microsoft Learn )

       Document document = new Document(fileName);
       foreach (Page page in document.Pages)
       {
          Aspose.Pdf.Text.TextBuilder builder = new Aspose.Pdf.Text.TextBuilder(page);
       }

We are on an old version of Aspose (March 2016) but have reproduced the same issue with a newer trial version.

Our application allows users to upload their own documents, which can later be included in communication where we need to merge or manipulate the uploaded document – creating the issue we have found.

Can we expect this to addressed in a future update?

Thanks
Shawn

OpenRFI00001_Fail.pdf (47.5 KB)

@sjdunne

We were able to replicate the issue in our environment. However, we also noticed that Adobe Reader showed an error dialog saying that PDF file was corrupt. The problem seems related to this specific PDF document.

Would you please confirm if you are facing this issue with same type of documents only? Also, we have logged an investigation ticket as PDFNET-47023 in our issue tracking system. We will surely look into details of the issue and keep you posted with the status of ticket resolution. Please be patient and spare us little time.

yes, this is definitely document specific. We only have this one instance so far that we are aware of, but wanted to raise it asap because of the severity of the failure.

thanks
Shawn

@sjdunne

We will surely look into details of this issue and inform you as soon as we have additional updates about its rectification. Please spare us little time.