pdfconcat
annotate bin/pdfdetextify @ 0:8f7e68d54c6d
initial commit: should be already usable
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 29 Aug 2013 13:58:17 +0200 |
parents | |
children |
rev | line source |
---|---|
meillo@0 | 1 #!/bin/sh |
meillo@0 | 2 # |
meillo@0 | 3 # convert pdf to tiff and back to pdf in order to convert text to image |
meillo@0 | 4 # writes to stdout |
meillo@0 | 5 # |
meillo@0 | 6 # depends on: gs, tiff2pdf (libtiff-tools) |
meillo@0 | 7 |
meillo@0 | 8 temp="`mktemp /tmp/${0##*/}.XXXXXX`" |
meillo@0 | 9 trap 'rm -f "$temp"' 0 1 2 3 15 |
meillo@0 | 10 |
meillo@0 | 11 for i do |
meillo@0 | 12 # echo "processing $i" |
meillo@0 | 13 gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress \ |
meillo@0 | 14 -r300 -o "$temp" -sDEVICE=tiffgray -sCompression=lzw "$i" |
meillo@0 | 15 tiff2pdf -z "$temp" |
meillo@0 | 16 done |