You can extract text with k2pdfopt as well:
k2pdfopt -ocrout %s_textout.txt *.pdf -mode copy -dpi 50
This will extract text from all .pdf files in the folder. E.g. myfile.pdf will extract text to myfile_textout.txt.
Might want to view
this page as well.