public string ReadPdfFile() { string strText = string.Empty; try { PdfReader reader = new PdfReader(@"\\FilePath"); for (int page = 1; page <= reader.NumberOfPages; page++) { ITextExtractionStrategy its = new iTextSharp.text.pdf.parser.SimpleTextExtractionStrategy(); String s = PdfTextExtractor.GetTextFromPage(reader, page, its); s = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.Default, Encoding.UTF8, Encoding.Default.GetBytes(s))); strText = strText + s; } reader.Close(); } catch (Exception ex) { } return strText; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)