ScanSnap s1500
(Yes, I could have cropped the photo, but… cat tax 😺)
- Fujitsu ScanSnap S1500
- Raspberry Pi 4
- Raspberry Pi Touch Display v1
- Raspberry pi 7” Display Stand_FULL assembly V2.0 — This is for V1 of the official 7” display. WARNING: Designed for RPi 3, not 4! I can’t put the back on.

Many thanks to:
- Better instructions: https://chrisschuld.com/network-scanner-with-scansnap-and-raspberry-pi/
- Extra installs: https://github.com/rocketraman/sane-scan-pdf/wiki/Dependencies-Installation
- http://howto.philippkeller.com/2018/02/08/Scan-with-raspberry-pi-convert-with-aws-to-searchable-PDF/
RPi image
- https://www.raspberrypi.com/software/
- Configure the installer:
- Set hostname
- Enable wifi
- Set user/password
- Enable SSH
Setup the RPi
sudo apt-get update
sudo apt-get upgrade
sudo apt install sane sane-utils scanbd git imagemagick -y
sudo apt install \
netpbm \
ghostscript \
poppler-utils \
imagemagick \
unpaper \
util-linux \
tesseract-ocr \
parallel \
units \
bc
cd $HOME
git clone https://github.com/rocketraman/sane-scan-pdf.git
# edit the `scriptdir=` line
scriptdir=/etc/scanbd/scripts
# add this to the `action scan` section
desc = "Scan to file and share"
script = "scan.sh"Create this file
#!/bin/sh
now=`date +"%Y-%m-%d-%H%M"`
/home/pi/sane-scan-pdf/scan -d -r 300 -v -m Lineart --skip-empty-pages -o /home/pi/scans/scan-$now.pdfsudo chmod +x /etc/scanbd/scripts/scan.shUpload to SMB share
Mount a remote SMB share, to upload scans to. I set it up pointing to the input (consumption) folder on my paperless-ngx server.
sudo apt install cifs-utilsbelow is from Google, and edited
- Mount the SMB Share (Persistent - using
/etc/fstab): For the share to be mounted automatically on boot, add an entry to your/etc/fstabfile. This is generally preferred for permanent mounts. Create a credentials file (optional but recommended): This keeps your username and password out of the fstab file directly. Create a file (e.g.,~/.smbcredentials) and add your username and password:
username=YOUR_SMB_USERNAME
password=YOUR_SMB_PASSWORDSet appropriate permissions for this file:
chmod 600 ~/.smbcredentialsEdit /etc/fstab.
Open the file with a text editor (e.g., nano):
sudo nano `/etc/fstab`Add a line similar to the following, adjusting the path to your credentials file and the mount options as needed:
//SERVER_IP/SHARE_NAME /home/pi/myshare cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,nofail 0 0uid=1000,gid=1000: Sets the ownership of the mounted files to the default pi user (you can find your user’s UID and GID with the id command).
nofail: Prevents the system from failing to boot if the network share is unavailable.
- Test the Mount: After editing fstab, you can test the mount without rebooting:
sudo mount -aKiosk mode
Source: https://www.raspberrypi.com/tutorials/how-to-use-a-raspberry-pi-in-kiosk-mode/
sudo raspi-config
- Select System Options > Boot / Auto Login > Desktop Autologin: Desktop GUI, automatically logged in as ‘pi’ user.
- sudo nano .config/wayfire.ini
- Add:
[autostart]
chromium = chromium-browser https://raspberrypi.com --kiosk --noerrdialogs --disable-infobars --no-first-run --ozone-platform=wayland --enable-features=OverlayScrollbar --start-maximized --enable-wayland-ime --wayland-text-input-version=3
screensaver = false
dpms = falseNote: I added --enable-wayland-ime --wayland-text-input-version=3 to enable the on screen keyboard
Install on-screen keyboard
sudo apt install wvkbdI could never get the on-screen keyboard to work in kiosk mode. It only works in normal mode 😢.
So I ended up using a bluetooth keyboard.
Node Red
Installation
https://nodered.org/docs/getting-started/raspberrypi
bash <(curl -sL https://github.com/node-red/linux-installers/releases/latest/download/update-nodejs-and-nodered-deb)Config
mkdir /home/pi/node-red-static/- Edit the
httpStaticsection of node-red settings
httpStatic: [
{path: '/home/pi/node-red-static/', root: "/static/"},
],Plugins
- Hamburger menu
- Manage pallette
- Install
@flowfuse/node-red-dashboard
Flows
Blow are screenshots of the Flow diagrams. The latest code is on github .

Custom scripts
Customize the original trigger script and make a wrapper for the per-page script, so that we can send notifications to nodered. This provides onscreen feedback.
Custom trigger script
#!/bin/sh
# trigger node-red scan
wget -qO- http://scanner.local:1880/scan
# notify and copy to network share
wget -qO- --post-data "status=Uploading..." http://scanner.local:1880/scan-status
mv /home/pi/scans/*.pdf /mnt/paperless/
wget -qO- --post-data "status=" http://scanner.local:1880/scan-statusCustom per page script
#!/bin/bash
echo scan-per-page-helper: $1
/home/pi/sane-scan-pdf/scan_perpage $1
status=$?
# try to copy to node-red static folder, and notify node-red if success
# blank pages (and errors) aren't converted to pdf, so don't notify node-red
cp $1.pdf /home/pi/node-red-static/ && wget -qO- --post-data "image=$(basename $1).pdf" http://scanner.local:1880/scanned
exit $statusTell sane-scan-pdf to use custom per page script
mkdir -p /home/pi/.local/share/sane-scan-pdf/
nano /home/pi/.local/share/sane-scan-pdf/defaultsSCRIPT=/home/pi/scan-per-page-helperInitial config file
You need to prepopulate the config file so node-red can read items
FIXED: This shouldn’t be needed any more.
{"dpi":600,"mode":"Lineart","duplex":false,"skipBlank":true,"whiteThreshold":99.6}