Hi. I am trying to read text from a pdf file and write it to the console. I am only getting “MESSAGES::0002781167” along with the evalution / trial message going to the console. I have tried quite a few different methods from some of the examples but I just keep getting the same output.
static string getPDF()
{
try
{
string extractedText = "";
string pdfFile = @"directory";
Document doc = new Document(pdfFile);
TextAbsorber textAbsorber = new TextAbsorber();
doc.Pages.Accept(textAbsorber);
extractedText = textAbsorber.Text;
return extractedText;
}
catch (Exception ex)
{
return ex.Message;
}
}