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