views:

252

answers:

3

Is there a library that has a class to extract the text from a pdf file in c#.net? I've tried a few but documentation is terrible, so I haven't been able to get it off the ground. Also if it provides a class to extract images that would be a plus. Any suggestions? Thx in advance.

Also I need to be able to implement it into an existing application.

+2  A: 

Have you tried PDFKit.NET? It has reasonable docs and some good examples. It is designed for a server environment, so it is a little expensive.

EDIT Here is a free library on SourceForge called iTextSharp. I haven't used it, but it looks promising. Here is a tutorial for it that has lots of code examples.

jheddings
+1 free is good.
J.Hendrix
A: 

we've used snowbound software at work for image conversion. it apparently supports text extraction too. however, it's not free.

ob
not sure why the link won't work. but you can go to snowbound.com -> solutions -> text extraction
ob
+1  A: 

There are a couple of ways you can go here -- a lot of it will depend on whether you want to retain the formattting (i.e., paragraphs and other layout elements) of the original PDF.

If you're considering commercial solutions, we do offer two products that might meet your requirements. One is EasyPDF SDK which has single shot ExtractText() and ExtractText2() calls that pull text out of your PDFs as plain text.

Note that the output from these calls is pretty simplistic and you will lose a lot of the original layout elements. They're nice for simple text extraction but might not be great if your PDF contains tabular data.

If you're dealing with tables, a nicer alternative could be to pull it out as rich text instead. We a have a tool called EasyConverter SDK geared for business documents which does just that using a single function call.

With EasyConverter SDK, the layout of your original PDF will be retained.

Both support C# so feel free to check out the eval versions at www.pdfonline.com if you're interested. I do work for the vendor so do take this suggestion as kind of a mother loving her own child :-) I've been browsing stackoverflow.com for code snippets for a long time, but have only recently started posting, so if you have any questions with either API just let me know and I can help. Cheers!

yu-chen-pdfonline-com