Setup a Scanner
Overview
Scanning on Trisquel is mostly done through SANE. There are other tools out there, but most end up using SANE through the scanning process.SANE
“Scanner Access Now Easy (SANE) is an application programming interface (API) that provides standardized access to any raster image scanner hardware (flatbed scanner, handheld scanner, video- and still-cameras, frame grabbers, etc.). The SANE API is public domain and its discussion and development is open to everybody. It is commonly used on Linux.” - SANE on Wikipedia SANE by itself only creates a common API, so all supported scanners can be accessed in the same way by higher level applications, despite the underlying communication (drivers) varying between manufacturers and printer models. See the bellow information for the listing of currently supported devices.SANE Supported Devices
A list of supported devices can be found here. This is the same list as SANE Backends, but sorted by scanner brand. The Free Software Foundation (FSF) previously maintained a hardware directory. The FSF has has begun migrating this data to the community supported site h-node. The scanner site is a resource that will help users find information about if scanners work with all Free Software. Users are encouraged to submit hardware information to h-node because this will help the community know which hardware is supported and which to avoid.Initial Setup
‘’scanimage'’ is a basic command line tool included with the SANE package that will allow you to scan only to “.pnm” and “.tiff” formats, which you will later have to convert as required. Here we will use it just to test the scanner. To make sure your device will work with the current SANE setup, use:scanimage -L
Example output: device `niash:libusb:002:002' is a Hewlett-Packard ScanJet 4300C flatbed scanner
Note: ‘’sane-find-scanner'’ did not find this scanner.Taking your scanner out for a test: scanimage >image.pnm
Consult the man page for additional information.
SANE Frontends
SANE frontends are applications designed to interact with the SANE API and not with devices directly. This is only required, if you prefer working with a GUI (Graphical User Interface). On Trisquel you can find ‘’simple-scan'’, which has virtually no setup and will provide enough functionality for most users.xsane
This is the most advanced graphical application for scanning on Linux and is part of the SANE project. This tool is extremely well documented here. It will cover almost all cases of scanner usage on GNU/Linux.gscan2pdf
This application is designed towards scanning to Portable Document Format (PDF) and doing Optical Character Recognition (OCR). It does not provide the same functionality as ‘’xsane'’.simple-scan
This is by far the most user friendly tool for basic usage. Given the simplicity of this application there does not seem to be a central hub for it’s documentation. Nonetheless, you can find more about the project here.SANE Backends
These are the drivers that are included with SANE by default. In case you have a more recent scanner, you should compare it to the appropriate version of SANE, since there is some delay until the updates reach Trisquel. There are also other drivers provided by the package ‘’libsane.extras'’. The drivers provided by the this package seem to be only ‘’geniusvp2‘’ and ‘’ls5000‘’. You can find, which these devices support on the SANE external backends page on the following section.SANE External Backends
External Backends are drivers not included with SANE by default. On the above link you can find all devices that are supported by these external drivers and the reasons for them not being included in the SANE project.Physical Scanner Buttons
Buttons in the scanners are usually designed to work only with the original Operative Systems that the scanner was designed to work with or will depend on proprietary drivers/firmware. However, ‘’scanbuttond'’ and ‘’scanbd'’ may be able to cover this functionality, by running custom shell scripts upon button interaction.- ‘’scanbuttond'’ - Known to conflict with SANE to some extent and is no longer maintained.
- ‘’scanbd'’ - Not available on Trisquel 7.0 and lower. It will probably be included in the next release of Trisquel. It is licensed under GPL v2 and you can compile it from source on Trisquel 7.0 .
For compilling ‘’scanbd'’ on Trisquel 7.0, the following packages are needed: build-essential checkinstall libconfuse-dev libusb-dev libudev-dev libdbus-1-dev dbus libsane-dev
After this you can follow the standard building method ( “./configure”, “make” and “make install” on the root directory of the source code).
Page dimensions
Simple Scan has page setting options in Document -> Preferences. You can also find this configuration in xsane and gscan2pdf.
If your scanner doesn't seem to listen to your Preferences settings, you can modify the page dimensions after scanning.
" Suppose we want to trim the pages of our input file prior to n-upping. This can be done by using a pipe:
pdfjam myfile.pdf --trim '1cm 2cm 1cm 2cm' --clip true --outfile /dev/stdout | pdfnup --frame true --outfile myoutput.pdfThe --trim option specifies an amount to trim from the left, bottom, right and top sides respectively; to work as intended here it needs also --clip true. These (i.e., trim and clip) are in fact options to LaTeX's \includegraphics command (in the standard graphics package)." - Example 6 - University of Warwick