In my testing I only seem to be able to recreate this with OCR'd documents if that helps in your investigations and resolution.
- Code: Select all
public void OCRandSpecialCharacterText()
{
string strFileName = @".\Non-Hyphen Test.pdf";
string strTargetName = @".\Non-Hyphen Test Highlighted.pdf";
string strRegexSearch = @"\b(5/4/2011)\b";
Spire.Pdf.PdfDocument pdf = new PdfDocument(strFileName);
foreach (PdfTextFind text in pdf.Pages[0].FindText(strRegexSearch, TextFindParameter.Regex).Finds)
{
text.ApplyHighLight(Color.Gold);
}
pdf.SaveToFile(strTargetName);
pdf.Close();
}