Vincent Rasneur [email protected]
- pdftk
- ghostscript
- imagemagick
- tesseract
To OCR a PDF file
ocr.sh document.pdf
ocr.sh -t eng document.pdf
ocr.sh -t eng -c document.pdf
For a PDF file named doc1.pdf
, the script:
- creates a directory named
doc1
- for each PDF page, a file named
pg_<number>.txt
is created inside this directory
Or, if the -c
argument is used, the script:
- creates a directory named
doc1
- creates a unique file named
doc1/doc1.txt