Scan to Evernote with Rasberry Pi

August 20, 2014

Read time 2 min


I’ve had long time a plan to scan all receipts and documents and save them to Evernote in order to find what I need quickly, even when mobile.


I’ve been lazy scanning because there are so many steps:

  1. Connect scanner to a computer
  2. Open scanning software
  3. Place the document inside the scanner
  4. Click scan in the software
  5. Enhance contrast
  6. Copy the image to Evernote

While it should be simple as:

  1. Place the document inside the scanner
  2. Click email button from the scanner


Plug the scanner to a Rasberry PI (connected to internet) and keep it always on. Have the physical scanner buttons scan and send to different targets (Evernote, Dropbox, printer, email).


  • Scanner (Canon CanoScan Lide 110)
  • Rasberry PI Model B
  • 4GB SD
  • USB stick with Raspbian installer


  1. Install Raspbian
  2. Install scanner software: apt-get install sane
  3. Install scanbd to control scanner buttons:
    apt-get install libconfuse-dev libhal-dev libsane-dev
    tar zxvf scanbd.tar.gz
    make install
  4. Install mutt mail client: sudo apt-get install mutt
  5. Configure smtp for mutt (place the configuration under /root):
  6. Install imagemagic: sudo aptitude install imagemagic
  7. Take control of one of the Rasberry PI’s led:
    echo 1 > /sys/class/leds/led0/brightness
    echo 0 > /sys/class/leds/led0/brightness
  8. Set up Dropbox commandline client
  9. Configure scanbd:
    echo 1 >/sys/class/leds/led0/brightness 
    DIR=`dirname $0`
    datetime=`date +%F_%H%M%S`
    case $SCANBD_ACTION in
    # Not working
    # Upload to dropbox, used for photos
    scanimage --mode Color --depth 32 | convert - $scan_dir/$filename.jpg upload $scan_dir/$filename.jpg  /
    # Print with default printer
    scanimage --depth 16 | convert - $scan_dir/$filename.jpg
    lp $scan_dir/$filename.jpg
    # Send to Evernote via email
    scanimage --mode Color --depth 16 | convert - -normalize -level 10%,90% -sharpen 0x1 $scan_dir/$filename.jpg 
    echo "" | mutt -a $scan_dir/$filename.jpg -s "$filename" -d 5
    rm $scan_dir/$filename.jpg
    echo 0 >/sys/class/leds/led0/brightness 
    exit 0

Sign up for our newsletter

Get the latest from us in tech, business, design – and why not life.