pdfconcat

view 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
line source
1 #!/bin/sh
2 #
3 # convert pdf to tiff and back to pdf in order to convert text to image
4 # writes to stdout
5 #
6 # depends on: gs, tiff2pdf (libtiff-tools)
8 temp="`mktemp /tmp/${0##*/}.XXXXXX`"
9 trap 'rm -f "$temp"' 0 1 2 3 15
11 for i do
12 # echo "processing $i"
13 gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress \
14 -r300 -o "$temp" -sDEVICE=tiffgray -sCompression=lzw "$i"
15 tiff2pdf -z "$temp"
16 done