Scanner are a new and innovative hardware.
In the last years companies like Hewlett-Packard and others companies, offers to us, hardware that can print, scan and also send faxes.
A common question is are these scanners supported by Linux?
Generally the question is affermative. This training wants to teach you how to scan your documents.
| || |
Under Linux the better program to scan documents is SANE (Scanner Access now Easy). You can download an updated version from sunsite.unc.edu
SANE offers a frontend and backend to scan your documents. You also will need "xsane" the X front-end to the program.
The first versions of these program supports only SCSI Scanners, specially HP ScanJet. Latest editions now offers support also for Parallel Scanner, like HP OfficeJet.
The better mode to support this is to download a Linux Distribution that includes these programs like RedHat (wolverine) or FTOSX Beta.
To know if your scanner is supported under Linux you can check: http://www.FutureTG.com/FTOSX/Hardware/i386/index.html
Scanning documents under Linux.
Your scanner, not under Linux but on any Operating System, will be connected to your system in one of following modes:
- Parallel SCSI (ppSCSI), like HP ScanJet
- Parallel IDE (PARIDE), like HP OfficeJet or
- an USB Scanner
In the next three sections we will scan images on the Helwett-Packard OfficeJet 1150C, using the parallel port. This is basically complex, because uses the parallel port.
Under Linux, the scanner support uses SANE (Scanner Access Now Easy). This packages comes in two subpackages:
- sane-backend, where are included all the "drivers" for SCSI, USB and Parallel ports.
- sane-frontend. This includes the xscanimage and xcam graphical program, as a frontend.
The most complex step is the hardware recognition.
This particular Scanners, need the hpoj driver developed by David Paschal: hpoj as well the sane backend correctly configured. After these "backend" steps are completed is possible to use any frontend like: "xscanimage", "xsane" or KDE "kooka".
The HP OJ 1150 C, is a scanner that works with the parallel port. Before to start be sure that your BIOS includes the ECP (bi-directional) for the parallel port.
Then, install the driver:
[root@ftosx1 root]# rpm -qi hpoj
Name : hpoj Relocations: /usr
Version : 0.8 Vendor: (none)
Release : 1 Build Date: Mon 01 Jul 2002 04:56:06 PM CEST
Install date: Mon 01 Jul 2002 04:57:03 PM CEST Build Host: ftosx1.futuretg.com
Group : System Environment/Daemons Source RPM: hpoj-0.8-1.src.rpm
Size : 607596 License: GPL
URL : http://hpoj.sourceforge.net/
Summary : HP OfficeJet Linux driver
The HP OfficeJet Linux driver provides printing and scanning support for
most Hewlett-Packard all-in-one peripherals connected to a parallel port,
USB port, or LAN via selected HP JetDirect print servers. Additional
applications are provided to view the contents of the front-panel LCD
and to access other control and status features of the device.
It is work in progress, but printing and scanning are supported on
most models, when either connected to the parallel port or USB on a
Linux (Intel or Alpha) workstation, or to a LAN with selected HP
JetDirect print servers.
Now, the most important step is to launch the daemon. But, is necessary to know the hardware configuration for the address memory for the port (generally 0x378), and also the basehigh address that is 0x400+base address, and then 0x778.
We use on our system, the following configuration:
[root@ftosx1 etc]# more ptal-start.conf
ptal-mlcd par:0 -device -base 0x378 -basehigh 0x778 -device /dev/lp0 $PTAL_MLCD_CMDLINE_APPEND
ptal-printd mlc:par:0 $PTAL_PRINTD_CMDLINE_APPEND
After this file, is saved, we can lauch the daemon.
[root@ftosx1 root]# /etc/rc.d/init.d/ptal-init start
Stopping the HP OfficeJet Linux driver.
Starting the HP OfficeJet Linux driver.
Is very interesting how, this "very complex driver" was completed. Me, in particular join to the team to help them, but I was too busy to help. Basically, all the job, the code and the design was made by David Paschal. Atually, he was hired by HP.
Some other HP OfficeJet more modern, support the Once, this driver is running, we need to setup SANE . SANE is a set of
[root@ftosx1 sane.d]# more hp.conf
Here we present an updated screen for the actual website.
There are also present some graphical front-end, equivalent to the printer panel panel.
The author develop also a more sophisticated interface, called: "xhpcontrol".
There are different programs (or front-end) for this purpose:
- "xscanimage", is the most elementary graphical front-end. It belong to sane-frontend package.
- "xsane", is the most advanced front end for SANE. It belong to the "xsane" package.
- "kooka", is the KDE flavor front-end for scanners and OCR.
After, all this, we need simply to run the application.
[root@ftosx1 root]# xscanimage
After some checking on the scanner we will have the following mask:
|If we click on the "Preview Window" we will have the following screen.||Then, will appears the scanned image that we can|
There are four possibilities in the scan mode:
Using "xsane" the SANE front-end "xsane" is more sophisticated front-end for this purposes.
This program offers a more clear and innovative preview.
|xsane supports more options that "xscanimage". |
The images are saved in "/tmp".
|It is also possible to send a fax and preview it |
|Also, the OCR support is included.|
Using GIMP to Scan your documents.
Now, we will show how is possible to scan documents using "xsane" or "xscanimage".
GIMP support plug-ins and offers the possibility the connect external plug-ins in an easy mode.
Running the command:
[root@ftosx1 root]# ln -s /usr/local/bin/xscanimage ~/.gimp-1.2/plug-ins/
[root@ftosx1 .previews]# file hp\:mlc\:par\:0
hp:mlc:par:0: PC bitmap data, Windows 3.x format, 638 x 877 x 24
Will be possible to scan documents from GIMP. In fact, simply open the menu "Xtns-> Acquire Image" and we will have the following screens:
After we acquire the image we can edit it and save it.
|The final image in GIMP||... and the final image in JPG format.|
Using KDE Kooka.
The KDE Team develop a program called "kooka" capable to scan and offers OCR (if the program is installed).
Like, any other front-end recognize the interface.
"kooka" supports the preview and also
"kooka" after some try-outs.
OCR under Linux.
Actually OCR (Optical Character Recogntion) is more stable and sucessufull than in its first days.
"kooka" supports this feature in a clear and mode.