blob: de45664dbce8d101de191745b395762ba527f80e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
usage()
{
echo "Usage: a4copy [Lineart|Gray|Color]"
}
#test to see if the mode and a filename have been entered
if [ $# -lt 1 ] ; then usage ; exit 1 ; fi
mode=$1
echo Now scanning your A4 document to pdf
#scan the A4 binary(b&w) file uncompressed at 300dpi to temporary file
scanimage \
--mode $mode \
-x 210 -y 296 \
--resolution 300 \
--format=tiff > temp-copy.tif
#convert to pdf with G4 compression
tiff2pdf temp-copy.tif -p A4 -q G4 -o temp-copy.pdf
rm temp-copy.tif
#print pdf
lpr temp-copy.pdf
|