The following throws an exception on page.ExtractText() on the first page. The pdf doc appears to load fine.. number of pages is correct after load. I have tried with multiple pdf docs to make sure its not the pdf file. The pdf loads fine in a pdf reader and also contains no images, just text. Exception is classic - "Object reference not set to an instance of an object.". Ideas?
StringBuilder sb = new StringBuilder();
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
doc.LoadFromFile(pdfFullPath);
foreach (Spire.Pdf.PdfPageBase page in doc.Pages)
{
txt = page.ExtractText();
if ( txt.Length > 0 )
sb.Append(txt);
}