I need to load a pdf file and then convert it to a text file programmatically in order to then parse it.
Another possibility would be to execute the file (execute Adobe Reader, with the pdf file as the argument) and then “send keys” to it to save the file as text.
However, I would prefer not to do it that way (opening the file) but will if that is the only solution. But: is it even possible to do a “send keys” sort of functionality in C#/WPF?
Note: I don’t want to buy any custom components, and besides, I’m using Visual Studio 2012 RC in this “home” project, so I don’t know if 3rd party components would be compatible anyway.
If you are looking to deploy this application to other users, I would tend to lean towards using one of the many PDF libraries available and process the PDF via code vs. attempting to use Adobe Reader. It will eliminate issues if your users don’t have Adobe Reader installed.
Try starting at the link below for some library ideas.
https://stackoverflow.com/questions/373926/lightweight-open-source-pdf-library-in-c
C# PDF Control & Library