c# - iText sharp SimpleTextExtractionStrategy(); -
i using itextsharp travers through pdf file. not find text imbedded within table.
public bool readpdffilespecial(string filename ) { var found = false; if (file.exists(filename)) { pdfreader pdfreader = new pdfreader(filename); (int page = 1; page <= pdfreader.numberofpages; page++) { itextextractionstrategy strategy = new simpletextextractionstrategy(); string currentpagetext = pdftextextractor.gettextfrompage(pdfreader, page, strategy); if (currentpagetext.contains("is on 18 years old. children must less 19 years old qualify medikids. however, ")) found = true; ; } pdfreader.close(); } return found; }
Comments
Post a Comment