Created
February 1, 2018 00:27
-
-
Save amandeepjutla/0c831b46e871a72c572523df6f6930ba to your computer and use it in GitHub Desktop.
Extract OCRed text from a pdf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ocrextract x where x is a pdf file will generate a text file containing x's text | |
convert -density 300 $1.pdf -depth 8 -alpha OFF $1.tiff | |
tesseract $1.tiff $1.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment