Rather than getting the text starting "Important Information" the call returns text starting "1Ô2Ö46)Õ6 1Õ.Ö4Ô)61ÖÕz"
The original PDF was created by TargetStream StreamEDS in case that is of use
This is the recreation code:
- Code: Select all
[TestMethod]
public void PDFCorruptedText()
{
string strFileName = @".\BOA Statement page 2 2.pdf";
Spire.Pdf.PdfDocument pdf = new PdfDocument(strFileName);
string strContents = pdf.Pages[0].ExtractText();
if (strContents.Contains("Important Information"))
{
Console.WriteLine("Text may be OK");
}
else
{
Console.WriteLine($"Text appears corrupted\n\n{strContents}");
}
pdf.Close();
}