If you have access to pdftohtml & sed, I use the following:
Code:
pdftohtml -c -s -i -xml INPUT_FILE.pdf
sed -e s/"<[^>]*>"//g INPUT_FILE.xml > OUTPUT_FILE.txt
That usually gives a reasonable text file, which can then be worked on if needed and converted to whatever format you wish using ebook-convert.