scripts/pdf2scan: Init
parent
e426e65a5c
commit
6ceae4c1b9
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
cat<<EOF
|
||||||
|
Usage: ${0##*/} INPUT OUTPUT
|
||||||
|
|
||||||
|
Convert a PDF to a blurred, black & white raster image.
|
||||||
|
EOF
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$1" ]; then
|
||||||
|
echo "$1 is not a valid file."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "$2" ]; then
|
||||||
|
echo "$2 exists."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
convert -threshold 90% -blur 1x1 -quality 100 -flatten -density 400 "$1" "$2"
|
Loading…
Reference in New Issue