User:Alexander Roidl/webscanpi

From XPUB & Lens-Based wiki
< User:Alexander Roidl
Revision as of 23:38, 6 December 2017 by Alexander Roidl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This setup is meant to scan remotely over the web with my scanner connected to the Pi every time someone visits the website.


This is done using the PI as a server.

The workflow consists of 3 parts:

1. cgi that fires a bash script (needs to be done)

2. bash-script that scans the image

3. php / html that gives back the image


Pre-installs

Setup Apache for serving as usual.

Install Sane

sudo apt-get install sane

plug in the printer

(if luckily sane knows the printer you can just use it, otherwise install drivers manually)

! Didn't work with the PZI Scanner because of missing linux drivers


Scripts

the bash-script of the scanning looks like:

sudo scanimage --device "pixma:MG4200_192.168.178.59" --resolution 200 --mode Color > /var/www/html/scan.tiff
convert -rotate 90 scan.tiff scan.jpg