Hey, I'm going to revive this dinosaur instead of making a new one.
I successfully used pypdfocr from the terminal to convert a pdf file, which leads me to believe that it does work on pythonanywhere.
However I am having trouble calling pypdfocr using subprocess.call
from within a webapp. Here's the error I'm getting, in case it helps
2016-05-23 21:58:44 Starting conversion of /home/crashoverride947/tmp/test_pdf.pdf#012Using 300 DPI
2016-05-23 21:58:44 /bin/sh: 1: Cannot fork#012#012WARNING: Tesseract-OCR execution failed!#012ERROR: Tesseract-OCR execution failed!
2016-05-23 21:58:45 Traceback (most recent call last):
2016-05-23 21:58:45 File "/home/crashoverride947/.local/bin/pypdfocr", line 11, in <module>
2016-05-23 21:58:45
2016-05-23 21:58:45 sys.exit(main())
2016-05-23 21:58:45 File "/home/crashoverride947/.local/lib/python2.7/site-packages/pypdfocr/pypdfocr.py", line 492, in main
2016-05-23 21:58:45
2016-05-23 21:58:45 script.go(sys.argv[1:])
2016-05-23 21:58:45 File "/home/crashoverride947/.local/lib/python2.7/site-packages/pypdfocr/pypdfocr.py", line 474, in go
2016-05-23 21:58:45
2016-05-23 21:58:45 self._convert_and_file_email(self.pdf_filename)
2016-05-23 21:58:45 File "/home/crashoverride947/.local/lib/python2.7/site-packages/pypdfocr/pypdfocr.py", line 480, in _convert_and_file_email
2016-05-23 21:58:45
2016-05-23 21:58:45 ocr_pdffilename = self.run_conversion(pdf_filename)
2016-05-23 21:58:45 File "/home/crashoverride947/.local/lib/python2.7/site-packages/pypdfocr/pypdfocr.py", line 359, in run_conversion
2016-05-23 21:58:45
2016-05-23 21:58:45 hocr_filenames = self.ts.make_hocr_from_pnms(preprocess_imagefilenames)
2016-05-23 21:58:45 File "/home/crashoverride947/.local/lib/python2.7/site-packages/pypdfocr/pypdfocr_tesseract.py", line 147, in make_hocr_from_pnms
2016-05-23 21:58:45
2016-05-23 21:58:45 pool.join()
2016-05-23 21:58:45 File "/usr/lib/python2.7/multiprocessing/pool.py", line 460, in join
2016-05-23 21:58:45
2016-05-23 21:58:45 assert self._state in (CLOSE, TERMINATE)
2016-05-23 21:58:45 AssertionError
2016-05-23 21:58:45