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

Free Support Forum - aspose.com

TextFragmentAbsorber.TextFragments not returning correct number of TextFragments

Hi,I run the following code on the attached file and get an absorber.count = 8 but only 4 TextFragments in the collection from the call to absorber.TextFragments.

For other search strings like "Source Code" and "You", I do not see this error.

Can you tell me why I get this error?

Also, how can I get a collection of textfragment objects for all the words on a PDF page?

Document pdfDoc = new Document("C:\\temp\\license.pdf");

TextFragmentAbsorber absorber = new TextFragmentAbsorber("EULA");


TextFragmentCollection collect = absorber.TextFragments;

Console.WriteLine("Count = " + collect.Count);

foreach (TextFragment textFragment in collect)






Hi Saif,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the file and sample code.

Well, you are facing an evaluation restriction. In evaluation mode (without a license), only 4 items are allowed from any collection to be processed. To avoid such evaluation restrictions, I would suggest you to request a free temporary license for 30 days and evaluate your required features. For that, please use the below link to acquire a temporary license (choose “Get a Temporary License” option).


feel free to contact support in case you have any query.<o:p></o:p>

You & Best Regards