meillo@0: #!/bin/sh meillo@0: # meillo@0: # convert pdf to tiff and back to pdf in order to convert text to image meillo@0: # writes to stdout meillo@0: # meillo@0: # depends on: gs, tiff2pdf (libtiff-tools) meillo@0: meillo@0: temp="`mktemp /tmp/${0##*/}.XXXXXX`" meillo@0: trap 'rm -f "$temp"' 0 1 2 3 15 meillo@0: meillo@0: for i do meillo@0: # echo "processing $i" meillo@0: gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress \ meillo@0: -r300 -o "$temp" -sDEVICE=tiffgray -sCompression=lzw "$i" meillo@0: tiff2pdf -z "$temp" meillo@0: done