Hi,
How to read particular values from pdf file using asp.net c#, like date, Name , email id etc.
Please help.
Thanks
What I have tried:
I tried some code from google but it is for reading all values, but i want some particular values.
static void Main(string[] args)
{
string pdfdata = ExtractTextFromPdf(@"report_grid.pdf");
Console.WriteLine(pdfdata);
System.Console.ReadLine();
}
public static string ExtractTextFromPdf(string path)
{
using (PdfReader reader = new PdfReader(path))
{
StringBuilder text = new StringBuilder();
for (int i = 1; i <= reader.NumberOfPages; i++)
{
text.Append(PdfTextExtractor.GetTextFromPage(reader, i));
}
return text.ToString();
}
}