I stumbled upon this post which improved the fax usage for my MFC:
http://ubuntuforums.org/showpost.php...76&postcount=8
Also I played around with the scripts that get executed when the machine keys are pressed to be a bit more useful to me. Note this is newbie stuff because I'm a newbie, so don't expect anything dramatic.
First, the script at /usr/local/Brother/sane/script/scantofile-0.2.1-3.sh (the version numbers at the end of your script may be different). This controls what happens when you select Scan to File on the machine. By default, it scanned at 100 dpi in an unusual .PPM format and left the file in /home/[your user name]/brscan.
I changed it to 200 dpi because I always scale it down in another program - it's easy to scale down images, but impossible to scale up if you don't have enough detail. Plus a 200 dpi full-page scan is still manageable across a wireless network, it's a little over 10 MB and takes about 10 seconds to transmit using "g" wireless networking. I changed the file format to TIFF - I don't know much about .PPM and it could be compressed, I want the raw scan and I'll save it in the format of my choice. Finally I always look at a scan in a graphics editor because it almost always needs to be cropped, at the very least, so I want to start GIMP automatically with this file loaded after the scan completes.
My modified script looks like this:
Code:
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
#
# 100,200,300,400,600
#
resolution=200
device=$1
mkdir -p ~/brscan
if [ "`which usleep`" != '' ];then
usleep 10000
else
sleep 0.01
fi
output_file=`mktemp ~/brscan/brscan.XXXXXX`
chmod 644 $output_file
echo "scan from $2($device) to $output_file"
scanimage --device-name "$device" --format=tiff --resolution $resolution> $output_file
echo gimp $output_file \;rm -f $output_file | sh &
To edit your script, use
Code:
gksudo gedit /usr/local/Brother/sane/script/scantofile-0.2.1-3.sh
, modifying the version number as necessary, and either overwrite the existing script with this one or change the number after "resolution" and the last two lines.
Other niceties which you might want but which I kept - change the location the files are sent to (change the "mkdir -p ~/brscan" line) and don't delete the initial raw scan after editing (remove "\;rm -f $output_file" at the end).
Next, /usr/local/Brother/sane/script/scantoimage-0.2.1-3.sh. This one already called GIMP but I changed the resolution and file format:
Code:
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
#
# 100,200,300,400,600
#
resolution=200
device=$1
mkdir -p ~/brscan
if [ "`which usleep`" != '' ];then
usleep 10000
else
sleep 0.01
fi
output_file=`mktemp ~/brscan/brscan.XXXXXX`
echo "scan from $2($device) to $output_file"
scanimage --device-name "$device" --format=tiff --resolution $resolution> $output_file
echo gimp $output_file \;rm -f $output_file | sh &
Finally, /usr/local/Brother/sane/script/scantoocr-0.2.1-3.sh. Turns out this one doesn't work by default at all - there were two lines at the end of the script which were supposed to say that OCR is not supported and then delete the scan. This can be rectified by installing two packages, tesseract-ocr (probably the most accurate command-line OCR engine) and OCRFeeder, a GUI for command-line OCR engines. To install these packages:
Code:
sudo apt-get install tesseract-ocr ocrfeeder
Then the OCR script can be modified to send the scanned file to OCRFeeder, at 200 dpi and in TIFF:
Code:
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
#
# 100,200,300,400,600
#
resolution=200
device=$1
mkdir -p ~/brscan
if [ "`which usleep`" != '' ];then
usleep 10000
else
sleep 0.01
fi
output_file=`mktemp ~/brscan/brscan.XXXXXX`
echo "scan from $2($device) to $output_file"
scanimage --device-name "$device" --format=tiff --resolution $resolution> $output_file
echo ocrfeeder --images $output_file \;rm -f $output_file | sh &
I may work on this one a little bit, the images you send to OCR need to meet certain requirements (1-bit black & white, etc), but this will only send colour scans to OCRFeeder even if you press the "Black" scan button - the program which detects the button press doesn't seem to differentiate between the two scan buttons. It might be possible to format the image correctly using the options for "scanimage".
Hope this helps!
Bookmarks