C# PDFSharp: Examples of how to strip text from PDF?

I Z picture I Z · Mar 6, 2012 · Viewed 27.2k times · Source

I have a fairly simple task: I need to read a PDF file and write out its image contents while ignoring its text contents. So essentially I need to do the complement of "save as text".

Ideally, I would prefer to avoid any sort of re-compression of the image contents but if it's not possible, it's ok too.

Are the examples of how to do it?

Thanks!

Answer

Extracting text from a PDF file with PDFsharp is not a simple task.

It was discussed recently in this thread: https://stackoverflow.com/a/9161732/162529