Fujitsu ScanSnap: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 45: Line 45:
include(scanner.d/fujitsu.conf)
include(scanner.d/fujitsu.conf)
</pre>
</pre>
* /srv/scanbd/scan.script
<pre>
#!/bin/bash
TMP_DIR=`mktemp -d`
#TMP_DIR=/srv/scanfolder
OUT_DIR=/srv/scanfolder
echo 'scanning..'
#scanimage --resolution 300 --batch="$TMP_DIR/scan_%03d.pnm" --format=pnm --mode Gray --source "ADF Duplex"
scanimage --batch="$TMP_DIR/scan_%03d.pnm" --format=pnm --resolution 300 --mode Color --source "ADF Duplex" --page-width 210 --page-height 297 -x 210 -y 297 --device-name='fujitsu:ScanSnap S1500:74986' -v -v
echo "Output saved in $TMP_DIR/scan*.pnm"
cd $TMP_DIR
echo 'converting to pdf...'
img2pdf *.pnm --output combined.pdf
</pre>


* disable to test manual scanning
* disable to test manual scanning
Line 50: Line 70:
systemctl stop scanbd
systemctl stop scanbd
</pre>
</pre>


== Testing manual scans ==
== Testing manual scans ==

Revision as of 18:27, 3 July 2020

Prepare Raspberry OS

apt update
apt full-upgrade
apt install aptitude sane-utils

Test Scanner Connection

lsusb
sane-find-scanner
scanimage -L

Scan Button Daemon

  • Install via apt:
apt install scanbd
  • change /etc/scanbd/dll.conf to fix kernel message:
#canon_pp
fujitsu
plustek_pp
  • Test:
systemctl -t service
tail -F /var/log/syslog
  • /etc/scanbd/scanbd.conf
 action scan {
                filter = "^scan.*"
                numerical-trigger {
                        from-value = 1
                        to-value   = 0
                }
                desc   = "Scan to file"
                script = "/srv/scanbd/scan.script"

include(scanner.d/fujitsu.conf)
  • /srv/scanbd/scan.script
#!/bin/bash

TMP_DIR=`mktemp -d`
#TMP_DIR=/srv/scanfolder
OUT_DIR=/srv/scanfolder

echo 'scanning..'
#scanimage --resolution 300 --batch="$TMP_DIR/scan_%03d.pnm" --format=pnm --mode Gray --source "ADF Duplex"
scanimage --batch="$TMP_DIR/scan_%03d.pnm" --format=pnm --resolution 300 --mode Color --source "ADF Duplex" --page-width 210 --page-height 297 -x 210 -y 297 --device-name='fujitsu:ScanSnap S1500:74986' -v -v
echo "Output saved in $TMP_DIR/scan*.pnm"

cd $TMP_DIR

echo 'converting to pdf...'
img2pdf *.pnm --output combined.pdf


  • disable to test manual scanning
systemctl stop scanbd


Testing manual scans

scanimage --batch="/srv/scan_%03d.pnm" --format=pnm --resolution 300 --mode Color --source "ADF Duplex"

OCRmyPDF via pip3

sudo apt install ghostscript libxml2 tesseract-ocr tesseract-ocr-deu pngquant unpaper leptonica-progs libleptonica-dev automake libtool zlib1g-dev libjpeg-dev python3 python3-pip libxml2-dev libxslt1-dev libffi-dev git

git clone https://github.com/agl/jbig2enc
cd jbig2enc
./autogen.sh
./configure && make
sudo make install
cd .. 

git clone https://github.com/qpdf/qpdf 
cd qpdf
./configure && make
sudo make install
sudo ldconfig
cd ..

sudo pip3 install --upgrade pip
sudo pip3 install pybind11
sudo pip3 install ocrmypdf

Links

Troubleshooting Links


Windows: Deactivate ScanSnap folder

  • regsvr32 /u "C:\Program Files (x86)\PFU\ScanSnap\SSFolder\SSFolder.dll"