public string ReadPdfFile(string path)
{
string result = "";
StringBuilder text = new StringBuilder();
PdfReader pdfReader = new PdfReader(path);
for (int page = 1; page <= pdfReader.NumberOfPages; page++)
{
ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
result += PdfTextExtractor. GetTextFromPage(pdfReader, page, strategy);
}
pdfReader.Close();
txtInput.Text = result;
return result;
}