pdfconcat

annotate bin/pdfdetextify @ 1:6ea97e3f7cb5

ignore log and upload, because they change in a live setup
author markus schnalke <meillo@marmaro.de>
date Thu, 29 Aug 2013 13:59:09 +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