User:Alexander Roidl/webscanpi: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
Line 39: Line 39:
convert -rotate 90 scan.tiff scan.jpg
convert -rotate 90 scan.tiff scan.jpg
</pre>
</pre>
=Pre-installs=

Latest revision as of 23:38, 6 December 2017

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