This is my first post on StackOverflow.
I have a PDF file on my system drive ... I want to write a program in C # using the Itextsharp.dll link to find a specific word in this PDF file ... let's say I want to search for "StackOverFlow" .. If the PDF contains the word "StackOverFlow", it should return true.
Otherwise, it should return false.
I have looked through many articles, but still have not received a solution. :-(
I have tried so far:
public string ReadPdfFile(string fileName) { StringBuilder text = new StringBuilder(); if (File.Exists(fileName)) { PdfReader pdfReader = new PdfReader(fileName); for (int page = 1; page <= pdfReader.NumberOfPages; page++) { ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy(); string currentText = "2154/MUM/2012 A";
Thanks in advance, Sabya Dev
c # pdf itextsharp
user2553159
source share