summaryrefslogtreecommitdiffstats
path: root/pdf2txt
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-06-14 09:11:16 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-06-14 09:11:16 +0200
commitc4810170979d2d2fb9cf1100c6345556c5ac01a8 (patch)
treeae3bddde2c470acffa19da34d23a32b9cb50fc4c /pdf2txt
parenta6741366902aff22e5b7b94fff543bdc82b74ef8 (diff)
downloadbin-c4810170979d2d2fb9cf1100c6345556c5ac01a8.zip
bin-c4810170979d2d2fb9cf1100c6345556c5ac01a8.tar.gz
add xx2yy
Diffstat (limited to 'pdf2txt')
-rwxr-xr-xpdf2txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/pdf2txt b/pdf2txt
new file mode 100755
index 0000000..e8632be
--- /dev/null
+++ b/pdf2txt
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+if [ $# -eq 0 ]; then
+ echo "usage $0 : pdffile"
+fi
+
+TIFF=$(basename $1 .pdf).tif
+OUTF=$(basename $1 .pdf)
+
+FMT=${TIFF_FMT:-"tiffgray"} #tiff24nc
+
+gs -r300x300 -sDEVICE=${FMT} -sOutputFile=$TIFF -dBATCH -dNOPAUSE $1
+tesseract $TIFF $OUTF
+rm $TIFF
+echo "output : ${OUTF}"