Need more help? Have us do it!
Boutell.Com Consulting Services

sanecgi

sanecgi Unix System Manager's Manual sanecgi

NAME

sanecgi -- web interface to all SANE-compatible scanners

VERSION

Version 0.3, 8/14/1998.

WHERE TO GET

From www.boutell.com.

DESCRIPTION

Provides a simple web browser-based user interface to all scanners that are compatible with the SANE scanning library. The user enters parameters such as the dimensions of the scan and the preferred graphics format. When the form is submitted, the host system generates a scanned image, which is displayed as an inline image. The form is again displayed, allowing the user to further refine the result. When the image is satisfactory, the image can be easily saved using the web browser. In most browsers, this is accomplished through the menu that appears when holding the right mouse button down over the image.

REQUIREMENTS

Since it relies on the SANE scanner support library, sanecgi requires a computer with SANE properly installed. SANE can drive many scanners. The author uses a Microtek E3 and the simplified SCSI card that ships with it. See the documentation of SANE for more information.

The following software must be installed for this program to operate. Since version numbers change, most links below are to directories, not individual files. Obtain, compile and install the most up to date version of each item not already installed on your computer.

Programs and LibrariesWhere to Download Them
Perl 5.004 or higherhttp://language.perl.com/CPAN/src/latest.tar.gz
SANEhttp://www.mostang.com/sane/
cjpegjpegsrc.v*.tar.gz
The netpbm utilitiesftp://ftp.x.org/R5contrib/netpbm-1mar1994.tar.gz
libpngftp://swrinde.nde.swri.edu/pub/png/src/libpng-*.zip
libzftp://swrinde.nde.swri.edu/pub/png/src/zlib-*.zip
pnmtopngftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-*.tar.gz

INSTALLATION

The Perl script scanner.cgi must be installed so that a web server will recognize it and execute it as a script. This is typically done by placing it in the cgi-bin directory. In some cases the web server is configured to regard filenames ending in .cgi as CGI scripts.

The first few lines of scanner.cgi contain parameters that must be set correctly. Most likely you will need to change one or more of these to indicate the directories in which various programs are found, including Perl itself.

If all of the above software is not installed properly, sanecgi will not be of any use to you. This is especially true of the scanimage program, a standard component of the SANE library which provides the underlying scanner support. Note that the correct scanner device must be specified. The SANE documentation discusses how to list the available devices.

ERRORS

If an image is not successfully scanned, any errors written to the standard error stream by scanimage and the image format conversion utilities are rendered as an image and displayed to the user.

SECURITY

Although sanecgi has been designed to be reasonably safe, most administrators will want to configure their web server to refuse access to the directory containing scanner.cgi unless the user's IP address is part of the local network. Alternatively the directory can be password protected. Both of these issues are covered in the Apache server documentation.

BUGS

If the netpbm utilities are missing or incomplete, meaningful error messages are not generated, since these utilities are used to render error messages.

LICENSE

Copyright (c) 1998, Thomas Boutell and Boutell.Com, Inc. This software is released for free use under the terms of the GNU Public License, version 2 or higher.

CONTACT INFORMATION

See the sanecgi web page for the latest release. Feel free to contact us.

If you are seeing error messages, make sure you have installed all of the required software!

THANKS

Thanks are due to the authors of SANE and the other required components. Thanks are also to the following contributors and debuggers:

  • Brian Masney

VERSION HISTORY

Version 0.1, 5/15/1998
Initial release.
Version 0.2, 5/23/1998.
Fixed several invocations of netpbm utilities that were not preceded by $netpbmdir. Fixed GIF rendering to always have a legal number of colors.
Version 0.2, 5/23/1998.
Fixed several invocations of netpbm utilities that were not preceded by $netpbmdir.
Version 0.3, 8/14/1998.
Fixed GIF rendering to always have a legal number of colors. Improved defaults. Added a random cookie to image URL to ensure that caching doesn't interfere. Correctly renders error messages when scanning line art. Numerous small fixes.
stripe-whores
stripe-whores
stripe-whores
stripe-whores

Contact Us

Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Boutell.Com, Inc. All Rights Reserved.