This is the continuation of the following topic:
Currently, I am using evaluation copy of asp.pdf. We will get the license version soon.
I am also seeing issues with searching text in PDF. It searches first 2 words in the list correctly but not the rest. Is it due to the evaluation copy ?
Here is the code:
foreach (var word in lstWords)
{
// construct the marker
string marker = word;
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(marker);
// Accept the absorber for all the pages
pdfDocument.Pages.Accept(textFragmentAbsorber);
// Get the extracted text fragments
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;
// Loop through the fragments
foreach (TextFragment textFragment in textFragmentCollection)
{
// store the page number
var pageNumber = textFragment.Page.Number;
}
}