setup scanner CanoScan LiDE 200 [debian]

based on:

install sane:
sudo apt-get install sane

List available scanners:
scanimage -L

help for device:
scanimage --help -d Canon

list all available backend options:
scanimage -A

possible commands to add to scanimage:
--mode Color|Gray|Lineart [Gray]
--resolution 4800|2400|1200|600|300|200|150|100|75dpi [75]
--format=pnm|tiff file format of output file

scan from terminal for example like this:
scanimage --mode Gray --resolution 150 --progress > ~/Schreibtisch/image.pnm #greyscaled
scanimage --mode Color --resolution 150 --progress > ~/Schreibtisch/image.pnm #color
scanimage --mode Lineart --resolution 150 --progress > ~/Schreibtisch/image.pnm #Lineart

create a bash script for scan and convert to png to pdf:
cd ~/
chmod +x

then paste the following code:

STR=`date +%s`
scanimage --mode Color --resolution 150 --progress > ~/Schreibtisch/$STR.pnm
pnmtopng ~/Schreibtisch/$STR.pnm > ~/Schreibtisch/$STR.png
rm ~/Schreibtisch/$STR.pnm
convert  ~/Schreibtisch/$STR.png  ~/Schreibtisch/$STR.pdf
rm ~/Schreibtisch/$STR.png

install imagemagick (needed to convert from png to pdf):
sudo apt install imagemagick

start the script from terminal with:

you will find the png pictures pdf files on your “Schreibtisch”

create a starter:
get an icon:
mkdir ‐p ~/.local/share/icons/
cd ~/.local/share/icons/

cd ~/.local/share/applications
nano scan2pdf.desktop

[Desktop Entry]
Comment=get a scanned pdf on 'Schreibtisch'

use the correct username in starter:
cd ~/.local/share/applications
sed -i 's/xxUserxx/'$USER'/' scan2pdf.desktop


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.