i need to convert a pdf file to txt file (or doc, but i prefer txt) in c# can someone tell me how can i do it? i saw something about it when i searched i Google but i didn't understand where i should put the file. so can someone tell me what references i need to do and what files do i need to add and where and what the code for the conversion?
The concept of converting PDF to text is not really straight forward and you wont see anyone posting a code here that will convert PDF to text straight. So your best bet now is to use a library that would do the job for you... a good one is PDFBox, you can google it. You'll probably find it written in java but fortunately you can use IKVM to convert it to .Net....
I've had the need myself and I used this article to get me started: http://www.codeproject.com/KB/string/pdf2text.aspx
Ghostscript could do what you need. Below is a command for extracting text from a pdf file into a txt file (you can run it from a command line to test if it works for you):
gswin32c.exe -q -dNODISPLAY -dSAFER -dDELAYBIND -dWRITESYSTEMDICT -dSIMPLE -c save -f ps2ascii.ps "test.pdf" -c quit >"test.txt"
Check here: codeproject: Convert PDF to Image Using Ghostscript API for details on how to use ghostscript with C#