Accessing TextFragment.Rectangle throws "Index was outside the bounds of the array" exception

Running the following code with the attached 1-page PDF on Aspose.PDF for .NET 24.4 gives an “Index was outside the bounds of the array” exception:

var pdf = new Document("input.pdf");
var absorber = new Aspose.Pdf.Text.TextFragmentAbsorber("432.0597331");
pdf.Pages[1].Accept(absorber);
Console.WriteLine(absorber.TextFragments[1].Rectangle);  // throws exception

input.pdf (62.5 KB)

Interestingly, catching & ignoring the exception and then re-reading the Rectangle property a subsequent time doesn’t throw another exception, but it just returns a 0,0,0,0 rectangle.

@ast3

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-57192

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.