Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- PAGES=58 # set to the number of pages in the PDF
- SOURCE=05.Kalt_erwischt_in_Hamburg.pdf # set to the file name of the PDF
- OUTPUT=book.txt # set to the final output file
- RESOLUTION=600 # set to the resolution the scanner used (the higher, the better)
- touch $OUTPUT
- for i in `seq 1 $PAGES`; do
- convert -monochrome -density $RESOLUTION $SOURCE\[$(($i - 1 ))\] page$i.tif;
- tesseract page$i.tif -l deu >> $OUTPUT;
- done
- errors in lines 6,8 --> ./convert.sh: line 6: $'\r': command not found
- error in line 9 --> syntax error near '$'do\r''
- line 9: `for i in `seq 1 $PAGES`; do
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement