Created
October 20, 2016 03:45
-
-
Save nuex/24ef96faed13a372d38b8483e616f871 to your computer and use it in GitHub Desktop.
convert scanned docs to tiny pdfs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
outname="$1"; shift | |
target="${outname}.tif" | |
scanimage --format tiff --resolution 300 --mode Gray > "$target" && \ | |
convert "$target" -colorspace gray -level 10%,90%,1 -blur 2 +dither -monochrome "${outname}_bw.tif" && \ | |
tiff2pdf -o "${outname}.pdf" "${outname}_bw.tif" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment