PDF conversion triggers Aspose.FileCorruptedException

Code to reproduce:

var inputFile = new FileInfo(@"Documents/TT11825.pdf");
using (var input = inputFile.OpenRead())
{
    using (var document = new PdfDocument(input))
    {
        var options = new OptimizationOptions
        {
            RemoveUnusedStreams = true, // <-- this option causes the exception
        };

        // the next line throws a StackOverflowException
        document.OptimizeResources(options);
    }
}

The problematic PDF document is attached: TT11825.pdf (1.5 MB)

@Horst
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-53868

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as PDFNET-53868) have been fixed in Aspose.PDF for .NET 24.8.