We encountered a problem while finding text on pdf document file. When calling FindAllText() method on document page, text is recognized incorrectly. As result, we receive strange MatchText and incorrect Finds collection, e.g.
There are three fonts embedded in this file:
Code used for testing:
- Code: Select all
using (var pdfStream = new FileStream(@"test.pdf", FileMode.Open))
{
PdfDocument document = new PdfDocument();
document.LoadFromStream(pdfStream);
var page = document.Pages[0];
var finds = page.FindAllText().Finds;
}
We use the 7.5.0 commercial version of Spire.Pdf. The pdf file has been added as an attachment.
Thanks in advance.
Best regards