18 lines
247 B
Bash
Executable File
18 lines
247 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
usage() {
|
|
echo "USAGE: $0 FILE.pdf"
|
|
exit
|
|
}
|
|
|
|
if [[ "$1" != *.pdf ]]; then
|
|
usage
|
|
fi
|
|
|
|
DEVICE='pixma:04A9178A_31A16C'
|
|
FORMAT='png'
|
|
RES=300
|
|
|
|
scanimage -d "$DEVICE" --format="$FORMAT" --resolution "$RES" | convert - "$1"
|