问题
I want to read and display the contents of the PDF files into my RichtextBox. I am using windows application C#. Is it possible? What is the way to do it?
回答1:
You can use Adobe PDF IFilter Library to convert a PDF document to text.
Also see an example on the CodeProject
回答2:
iTextSharp is another alternative PDF library for .NET.
回答3:
Since PDF is an binary format you'll have to use a pdf-library like pdflib in order to read pdf-files.
pdfLib
回答4:
You should checkout PDFSharp library and they have preview component, where else extracting text and showing them in RichTextBox could be little bit of more work, but you can try this.
来源:https://stackoverflow.com/questions/1340278/reading-pdf-in-c-sharp