using iTextSharp.text.pdf;
using iTextSharp.text.pdf.parser;
//从一个对话框打开一个pdf文件,并创建一个读取该文件的PdfReader
PdfReader reader = new PdfReader(ofd.FileName);
PdfReaderContentParser parser = new PdfReaderContentParser(reader);
ITextExtractionStrategy strategy;
strategy= parser.ProcessContent<SimpleTextExtractionStrategy>(1,new SimpleTextExtractionStrategy());
//将文本内容赋值给一个富文本框
rtbContent.Text = strategy.GetResultantText();