This script needs the following tools :
- ImageMagick,
convert
(Mac/Linux) ormagick
(Windows), to convert all.png
pages to black and white and compress them withCCITT Groupe 4
compression. - Use bbe or sed (if present) to add interpolation option to all CCITT streams. This makes the pages more pleasing to the eye (less "pixelated").
> ./pdf2bw.sh
Usage: pdf2bw.sh file.pdf [options]
Result: file_bw.pdf
Options:
-r, --resolution <int> : the resolution in dpi [default 200]
-t, --thershold <0-100> : the black/white thershold in percent [default 77]