User:Alexander Roidl/webscanpi: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


<img src="http://pzwiki.wdka.nl/mw-mediadesign/images/a/a6/Screen_Shot_2017-12-06_at_23.28.16.png" width="100%">
<img src="http://pzwiki.wdka.nl/mw-mediadesign/images/a/a6/Screen_Shot_2017-12-06_at_23.28.16.png" width="100%">


This is done using the PI as a server.
This is done using the PI as a server.
The workflow consists of 3 parts:
The workflow consists of 3 parts:
1. cgi that fires a bash script (needs to be done)
1. cgi that fires a bash script (needs to be done)
2. bash-script that scans the image
2. bash-script that scans the image
3. php / html that gives back the image
3. php / html that gives back the image


Line 34: 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