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");
pdfDoc.Pages[1].Accept(absorber);
TextFragmentCollection collect = absorber.TextFragments;
Console.WriteLine("Count = " + collect.Count);
foreach (TextFragment textFragment in collect)
{
Console.WriteLine(textFragment.Rectangle.ToString());
Console.WriteLine(textFragment.Text.ToString());
Console.ReadKey();
}