Mercurial > pdfconcat
diff 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 wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/pdfdetextify Thu Aug 29 13:58:17 2013 +0200 @@ -0,0 +1,16 @@ +#!/bin/sh +# +# convert pdf to tiff and back to pdf in order to convert text to image +# writes to stdout +# +# depends on: gs, tiff2pdf (libtiff-tools) + +temp="`mktemp /tmp/${0##*/}.XXXXXX`" +trap 'rm -f "$temp"' 0 1 2 3 15 + +for i do + # echo "processing $i" + gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -dPDFSETTINGS=/prepress \ + -r300 -o "$temp" -sDEVICE=tiffgray -sCompression=lzw "$i" + tiff2pdf -z "$temp" +done