4

I'm creating an OCR-ed PDF through tesseract:

tesseract input.tif out pdf

But I also need the hocr and txt files. Recent versions of tesseract already solved this but because it requires compiling both leptonica and tesseract, I'm not entirely comfortable with it.

I can use pdftotext to extract the text file but I can't seem to find a way to extract hocr from the PDF.

1

You can simply run the following command to create both pdf and hocr at the same time.

tesseract input.tif out pdf hocr 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.