0% found this document useful (0 votes)
11 views

ImageScannerDriver4Linux-UG_fi03

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

ImageScannerDriver4Linux-UG_fi03

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Image Scanner Driver for Linux

User's Guide

For the following driver:


Linux driver for fi Series scanner

First Edition Feb 28, 2017


Second Edition June 29, 2017
Third Edition Julyl 18, 2018

Issued by PFU Limited

1
Contents

LINUX DRIVER PRODUCT SPECIFICATIONS .................................................................. 5

1. LINUX DRIVER OVERVIEW ........................................................................................... 5

2. SUPPORTED DEVICES .................................................................................................. 6

3. PROVIDED PRODUCT UNITS ........................................................................................ 6

4. PROVIDED COMPONENTS AND SUPPORTED LANGUAGES .................................... 7

5. SYSTEM REQUIREMENTS ............................................................................................ 8

5.1 OS Environment ......................................................................................................................................... 8

5.2. CPU Architecture ...................................................................................................................................... 8

5.3. Disk Space Required ................................................................................................................................ 8

5.4. Recommended Computer Specifications .............................................................................................. 8

5.5. Operation Verification Tools ................................................................................................................... 8

6. INSTALLATION AND UNINSTALLATION PROCEDURES ........................................... 9

7. DRIVER FUNCTION OVERVIEW.................................................................................. 11

8.DRIVER FUNCTION DETAILS .................................................................................... 13

8.1. Method Using SANE API Function Interface ....................................................................................... 13

8.2. Method Using Scan Application Created Using SANE API ................................................................ 14

9. DRIVER OPERATION SPECIFICATIONS FOR ERRORS ........................................... 20

10. SCAN BUTTON MONITORING TOOL........................................................................ 22

11. MANAGEMENT TOOL ................................................................................................ 24

11.1 How to Use This Tool ............................................................................................................................ 24

11.2 Functions, Options, and Setting Values for Arguments.................................................................... 24

2
11.3 Models and Supported Functions ........................................................................................................ 28

11.4 Return Values ......................................................................................................................................... 28

APPENDIX: BASIC KNOWLEDGE FOR USING LINUX DRIVERS ................................. 29

1. LINUX ............................................................................................................................ 29

1.1. Ubuntu ..................................................................................................................................................... 29

2. SCANNERS ON LINUX PLATFORM ......................................................................... 31

2.1. SANE API ................................................................................................................................................. 31

2.2. SANE API Function Interface ................................................................................................................ 31

2.3. Scanning Software ................................................................................................................................. 32

2.4. Scanimage Usage Examples ................................................................................................................. 32

2.5. "xsane" Usage Example ........................................................................................................................ 34

2.6. Image Conversion of an Output Image................................................................................................. 35

3
Linux is a registered trademark or trademark of Linus Torvalds in the United States and other countries.
Red Hat is a registered trademark or trademark of Red Hat, Inc. in the United States and other countries.
Ubuntu is a registered trademark of Canonical Ltd.
The CentOS Marks are trademarks of Red Hat, Inc. ("Red Hat")
Debian is a registered trademark of Software in the Public Interest, Inc.
openSUSE® is registered trademarks of Novell, Inc. in the United States and other countries.
Windows is either a registered trademark or trademark of Microsoft Corporation in the United States and/or
other countries.
Intel and Intel Core are registered trademarks or trademarks of Intel Corporation in the United States and
other countries.
Other company names and product names are the registered trademarks or trademarks of the respective
companies.

4
Linux Driver Product Specifications

The Linux driver product specifications are described below.

1. Linux Driver Overview


This product is a library program for controlling fi Series scanners in Linux systems. It provides an
application interface based on SANE API. For this reason, it can be called from user applications
("scanimage", "xsane", etc.) that support SANE API installed in typical Linux systems. This product also
provides the functions for the following tools:
- Scan button monitoring tool: Used to start scanning when the scan button is pressed.
(If the scan button monitoring tool is not on, there is no guarantee that scanning starts when the scan
button is pressed.)
- Management tool: Used to manage consumables and configure the settings such as the period of time
before the scanner is automatically turned off when it is left unused, and the main/sub magnification level.
(For details, refer to "11. Management Tool".)

User Application or
"scanimage" or "xsane"

SANE API
SANE Project
Libsane.so (Dispatcher)
(Linux OS)
SANE API

Linux driver for fi Series scanners

(By PFU) (Scanner control and image


processing)
(Closed
Scan button monitoring tool
License)

Management tool

USB library API

(Linux OS)
Linux(libusb & usb driver)

USB connection

fi Series Scanner device

5
*Note: In Linux systems, the term "driver" refers to a module that is installed in the Linux kernel and operates
in privilege mode for the CPU. Previously, scanner drivers had been installed in the Linux kernel for
operation. Currently, drivers are installed as a library based on SANE API outside the kernel and
operate by dynamically linking from applications. Although it is actually a library, PFU and other
scanner manufacturers call it a "driver".

2. Supported Devices

The devices supported by this product are shown below.

fi Series scanners
No Device Notes
1 fi-7030/fi-7140/fi-7240/fi-7160/fi-7260/fi-7180/fi-7280/fi-7460/fi-7480

3. Provided Product Units

This product is provided in two packages (installers). The supported devices and OS version for each
package are shown below.

No Supported OS version Package (installer) filename Package


device format
1 fi Series Ubuntu 32-bit pfufs-ubuntu18.04_2.1.1_i386.deb DEB
2 scanners Ubuntu 64-bit pfufs-ubuntu18.04_2.1.1_amd64.deb DEB
The filenames have the meanings shown below.
Ubuntu18.04: OS Version. This is the Linux distribution name supported by this package.
2.1.1: Driver version number
i386/amd64: Supported CPU architecture
deb: Package format

6
4. Provided Components and Supported Languages

The provided components and supported languages in this product are shown in the table below.
(Yes: Supported, No: Not supported)
No. Component

Portuguese
(traditional)

(simplified)
Japanese

Chinese

Chinese
German

Spanish

Russian
English

Turkish
Korean
French

Arabic
Italian
1 Driver file No Yes No No No No No No No No No No No
2 Scan button No Yes No No No No No No No No No No No
monitoring tool
3 readme No Yes No No No No No No No No No No No
4 EULA Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

5 Management No Yes No No No No No No No No No No No
tool

*The No. 4 EULA is included in the package. This is also displayed on the download screen when
downloading the package for this product from the release site.

The components below are not included in the package.


- SOP (Software Operation Panel)
*The management tool provides part of the SOP functions. (For details, refer to "11. Management Tool".)
- Emulation tools
- Manual
- help
- Firmware update tool
- ERG (Error Recovery Guide)
- SCA (ScannerCentralAdmin Agent)

Also, the scanner device options below are not supported.


- Carrier sheet
- Imprinter

7
5. System Requirements

The system requirements for this product are shown below.

5.1 OS Environment

The relationship between this product and the OS environment (Linux distribution) is shown below.

Target OS Supported Installer Scanner Notes


OS available? operation
available?
1 Ubuntu Desktop 14.04 /16.04/18.04 Yes Yes Yes
LTS (32-bit/64-bit )

5.2. CPU Architecture

Intel x86 architecture (32-bit/64-bit)

5.3. Disk Space Required

2MB

5.4. Recommended Computer Specifications

CPU: Intel(R) Core i5 2400S @ 2.5GHz


Memory: 4.0 GB

5.5. Operation Verification Tools

Many versions of Linux can use the scanning applications "scanimage" and "xsane". This product can also
use these as operation verification tools, but an operation with other applications that support SANE API has
not been verified.

Application name Application description


scanimage Command line based scanning application.
Command line options can be used to specify detailed settings for scanning.
Because this is included in the distributions for Ubuntu from the start, it can
be used immediately after Ubuntu is installed.

8
xsane Scanning application for a GUI environment. Detailed settings can be
specified when scanning in a GUI screen.
Because this is not included in the distributions for Ubuntu 14/16/18, it
cannot be used immediately after Ubuntu is installed. To use "xsane", the
package must be downloaded from the Ubuntu distributor. To download and
install the package, follow the procedure below.

Preparation:
Establish an Internet connection on a computer.
Download Procedure:
Use the following procedure to download the files.
(1) Open the terminal software.
(2) Execute the "sudo" command, enter the password for the
superuser (root user) to become a root user.
sudo su -
(3) Use the command below to connect to the Ubuntu server and
check the latest package information, and then download it.
apt-get update
apt-get install xsane

*In environments using a proxy server to connect to the Internet, settings


may be required for the system. Make the settings based on the specific
proxy server environment.

6. Installation and Uninstallation Procedures

An example is shown below for installation and uninstallation of the fi Series driver (Ubuntu 64-bit).

Obtaining this product


This product can be downloaded from the vendor website. For more information, ask the vendor.
Preparation
- Copy the package that was downloaded from the website to the installation target computer.
- Turn off the scanner power, and remove the USB cable connected to the computer.
(1) Installation procedure
Use the procedure below to install the package.
1. After starting Ubuntu and logging in, open the terminal software.
2. Execute the "sudo" command, enter the password for the superuser (root user) to set to become a root
user.
3. Execute the "uname -m" command, and check that the Ubuntu OS type is the target 64-bit version.
4. Use the "cd" command to move to the folder where the "pfufs-ubuntu18.04_2.1.1_amd64.deb" package
is located.

9
5. Execute "dpkg –i pfufs-ubuntu18.04_2.1.1_amd64.deb" to install the package.
6. Execute "dpkg -l pfufs", and check that the package was installed correctly. If the package name pfufs
appears, installation was successful.
7. Connect the scanner, and turn on the power.
8. Start "scanimage", "xsane", or other operation verification tools, and check the scanning operation.

(2) Uninstallation procedure


Use the procedure below to uninstall the package.
1. Turn off the scanner power.
2. Open the terminal software.
3. Execute the "sudo" command, enter the password for the superuser (root user) to become a root user.
4. Execute "dpkg –r pfufs" to uninstall the package.
5. Execute "dpkg --purge pfufs" to delete the package information.
6. Execute "dpkg -l pfufs", and check that the package was uninstalled correctly. If the "pfufs" package
information is not displayed, the package was uninstalled successfully.

*Note
- Uninstalling this product does not delete any scanned image data.
- To find out the OS type, use the "uname" command. The result of the "uname –m" shows you the type of the
OS.

No. Display result OS type


1 i386 or i686 32-bit
2 x86_64 64-bit

10
7. Driver Function Overview
A function overview of this driver and specifications comparison with drivers by other companies and drivers
for the other operating system are shown in the table below.

PFU
(fi Series)
No Function
PaperStrea WIA
mIP Driver Driver Linux
Ubuntu 14 Yes
Ubuntu 15 No
Supported OS
1 Windows Windows Ubuntu 16 Yes
Ubuntu 17 No
Ubuntu 18 Yes
2 Supported architecture Intel x86 compatible Intel x86 compatible

3 32-bit CPU support Yes Yes Yes

4 64-bit CPU support Yes Yes Yes

5 Download from public Yes No Yes


site
6 Installer format Unique - Deb
7 Installer size 100MB - 2MB
8 Source license Unique Unique Unique
9 Scan software Included - No
10 Profile Yes Yes No
Paper source Front Yes
11 Yes
(Front/Rear/Duplex) /Duplex (Front/Rear/Duplex/Flatbed)

50 to 1200
12 Resolution dpi 75 to 600 dpi 50 to 600 dpi

Image type
13 (Color/grayscale/binary Yes Yes Yes
black & white)

Paper size
14 (Custom)
Yes No Yes

A3, A4, A5, A6,


Yes B4, B5, B6,
15 Paper size Yes (Various) Double-letter,
(Standard sizes) (Various) (*1) Letter,Legal,
Executive, Folio,
Postcard, Business card (*3)

16 Cropping Yes No Yes


17 Rotation (90°, 180°, Yes No No
270°)
18 Rotation (Automatic) Yes No No
19 Multifeed detection Yes No Yes
Brightness Yes Yes Yes
20 Contrast Yes Yes Yes
Gamma correction Yes No No
Automatic No Yes (SDTC)
21 Binarization function Static
threshold Yes Yes

11
PFU
(fi Series)
No Function
PaperStrea WIA
mIP Driver Driver Linux
Halftone No No
Error
diffusion No Yes
None/R/G/B/
22 Dropout color W/ No None/R/G/B/W
Custom
23 Image enhancement Yes No Yes
(Tone adjustment)
24 Inverted image Yes No No
Automatic color/black &
25 white detection Yes No No

26 Blank page detection Yes No Yes


27 Blank page detection Yes No Yes
(sensitivity)
28 sRGB correction Yes No No
29 Hole punch removal Yes No No
30 Multi image output Yes No No
31 Separation Yes No No
32 Edge repair Yes No No
33 Edge removal Yes No No
34 Digital endorser Yes No No
JPEG
35 compression Yes No Yes (*2)
(Output from the
scanner)
36 Asynchronous Yes No Yes
(pre-read)
Setting the waiting time
before the scanner
37 enters power saving Yes No Yes (management tool)
mode
Setting the time period
before the scanner is
38 automatically turned off Yes No Yes (management tool)
when it is left unused
39 Scan button Yes Yes Yes

(*1) Varies depending on the operating system.


(*2) JPEG output is possible because the data transfer speed between the scanner and the driver has been improved.
The data is transferred to an application as standard SANE API (uncompressed) data.
(*3) Only fi-7460 and fi-7480 support "A3", "B4", "Double-letter", and "Executive" paper sizes. fi-7460 and fi-7480 do not
support "Business card" paper size.

12
8.Driver Function Details
This product provides SANE API as a library for using the functions of this product from applications that
support SANE API ("xsane", "scanimage", etc.).
To use this product to scan a document with a scanner, use one of the methods below.

(1) Method using a SANE API function interface


This is used to perform direct control of the scanner from a C-language application.
(2) Method using a scan application ("scanimage", "xsane", etc.) created using SANE API
This is used to configure the scan settings from the OS standard CUI or a GUI application in order to
scan a document.

8.1. Method Using SANE API Function Interface


In SANE API, the SANE API function interface is preset as shown below. This product also supports the
SANE API functions below.
sane_init() - Initialize scanner library
sane_exit() - Exit scanner library
sane_get_device() - Get scanner device
sane_open() - Open scanner device
sane_close() - Close scanner device
sane_get_option_description() - Get option parameters
sane_control_option() - Set option parameter values
sane_get_parameters() - Get option parameter values
sane_start() - Start scan
sane_read() - Read data from scanner
sane_cancel() - Cancel scanner operation
sane_set_io_mode() - Set I/O mode
sane_get_select_fd() - Get file descriptor
sane_strstatus() - Get scanner status
For details on how to call the SANE API functions and the product functions, refer to the link below.
SANE API Specifications http://www.sane-project.org/html/

13
8.2. Method Using Scan Application Created Using SANE API

For applications that support SANE API ("scanimage", "xsane"), a list of the options that can be specified
when using this product with the "scanimage" command (CUI-based) is shown in the table below.
When using this product with "xsane" (GUI-based), the setting items corresponding to the options below can
be specified on the "xsane" setting screen.

Linux Driver Detailed Specifications for fi Series


Function Option Settable values of Notes
(Syntax) argument
(Bold: Default setting)
Paper --source Adf-front "Flatbed" is displayed only for the scanner
source Adf- back that has the relevant function.

Adf-duplex
Flatbed
Image type --mode Lineart
Gray
Color
Resolution --resolution [50 to 600] Settable in units of 1 dpi
(300)
Paper width --page-widt -fi-7460/fi-7480: - This setting is valid only when "Custom"
h [26~304.8] (210.0) is specified for "paper-size" (units: mm).
-fi-7030/fi-7140/fi-7240 (*3)
/fi-7160/fi-7260/fi-7180 - This setting value may be rounded by the
/fi-7280 application.
[26~216](210.0) - This setting is invalid when "Flatbed" is
specified for "--source".
Paper length --page-heig [26 to 5588] (297.0) - This setting is valid only when "Custom"
ht Note that the settable is specified for "paper-size" (units: mm).
length varies depending (*3)
on the resolution. - This setting value may be rounded by the
[26, 2700] for 401 dpi or application.
more. [26, 4064] for 301 - This setting is invalid when "Flatbed" is
to 400 dpi. [26, 5461] for specified for "--source".
201 to 300 dpi. [26,
5588] for 200 dpi or less.
(Continued on next page)

14
Function Option Settable values of Notes
(Syntax) argument
(Bold: Default setting)

Scanning area -l [0 to page-width] (0) - For the ADF, this setting is valid only
(Top-leftX) when "Custom" is specified for
"paper-size" (units: mm).
Scanning area -t [0 to page-height] (0)
- This setting value may be rounded by the
(Top-leftY)
application.
Scanning area -x [26 to page-width]
- -x and -y may be interpreted differently
(Bottom-right x) (210.0)
depending on the scanning tool.
Scanning area -y [26 to page-height] scanimage interprets -x and -y as the
(Bottom-right y) (297.0) size (width and height) of a scanning
area.
xsane interprets -x and -y as the bottom
right position of a scanning area.
Paper type --paper-si Custom When "Custom" is selected, scanning is
ze performed within the range of the setting
values for "page-height" and
"page-width". Also, if "page-auto" is
enabled, this setting is ignored.
- This setting is invalid when "Flatbed" is
specified for "--source".

A3 A3 (297 × 420 mm)(*1)

A4 A4 (210 × 297 mm)

A5 A5 (148 × 210 mm)

A6 A6 (105 × 148 mm)

B4 B4 (257 × 364 mm)(*1)

B5 B5 (182 × 257 mm)

B6 B6 (128 × 182 mm)

Double-Letter Double-Letter (279.4 × 431.8 mm)(*1)

Legal Legal (216 × 355.6 mm)

Letter Letter (216 × 279.4 mm)

Folio Folio (216.0 × 330.0 mm)

Executive Executive (184.15 × 266.7 mm)(*1)

Postcard Postcard (100 × 148 mm)

Business card Business card (90 × 55 mm)(*2)


(Continued on next page)

15
Function Option Settable values of Notes
(Syntax) argument
(Bold: Default setting)
Cropping --page-auto [=(yes | no)] - If this setting is enabled ("page-auto=yes"),
the setting values for "page-height",
"page-width", "paper-size", "Top-leftX",
"Top-leftY", "Bottom-right x", and "Bottom-right
y" are ignored. The maximum paper sizes that
can be scanned vary depending on the
resolution as shown below. However, the
actual paper sizes that can be scanned
depends on the computer environment.
Resolution fi-7030/fi-7140/ fi-7460/fi-7480
fi-7240/fi-7160/
fi-7260/fi-7180/
fi-7280
(dpi) (mm) (mm)
50 to 200 216 × 5588 304.8 × 5588
201 to 300 216 × 5461 304.8 × 5461
301 to 400 216 × 4064 304.8 × 4064
401 to 600 216 × 2700 304.8 × 2700
Cropping --page-auto-pri Speed - Speed: Priority is given to speed for cropping.
priority ority - Accuracy: Priority is given to accuracy for
cropping.
- This setting cannot be specified when the
following scanner model is used:
fi-7030
Accuracy
- This setting can be specified when "yes" is
specified for "--page-auto". However, this
setting cannot be specified when "Flatbed" is
specified for "--source" or when "White" is
specified for "--bgcolor".
(Continued on next page)

16
Function Option Settable values of Notes
(Syntax) argument
(Bold: Default setting)
Background color --bgcolor Black - This setting is invalid when "Flatbed"
that is used when is specified for "--source".
the ADF is used - This setting is ignored when "yes" is
for scanning specified for "--page-auto".
- It is recommended that you specify
White
"White" for "--bgcolor" when
scanning dark color documents.
- This setting cannot be specified
when the following scanner model is
used:
fi-7030
Brightness --brightness [-127 to 127] (0)
Contrast --contrast [-127 to 127] (0)
Binarization --bw-mode SDTC This setting is enabled when "Lineart"
method is specified for "--mode".
Threshold
SDTC: Automatic

Error-diffusion Threshold: Static threshold


Error-diffusion: Error diffusion
Binarization --threshold [0-255](128) This setting is enabled when
method (Static "Threshold" is specified for
Threshold) "--bw-mode".
Binarization --bw-sdtc-variance Low This setting is enabled when "SDTC"
method Mid is specified for "--bw-mode". Specifies
(SDTC level) High the SDTC level.

Dropout color --dropoutcolor White This setting is enabled when "Gray" or


Red "Lineart" is specified for "--mode".
Green
Blue
None
(Continued on next page)

17
Function Option Settable values of Notes
(Syntax) argument
(Bold: Default
setting)
Sharpness/ -- None - The sharpness is not adjusted and
images are not enhanced.
Image cleanup-sharpness
- This setting is enabled when "Color" or
enhancement "Lineart" is specified for "--mode".
Smoothing This setting is enabled when "Lineart" is
specified for "--mode".
Emphasis-level-1 This setting is enabled when "Color" or
Emphasis-level-2 "Lineart" is specified for "--mode".
Emphasis-level-3
Descreen-level-1 This setting is enabled when "Color" is
Descreen-level-2 specified for "--mode".
Descreen-level-3
Descreen-level-4
Blank page skip --blank-page-skip [=(yes | no)] - If yes is specified, the data for blank
pages is deleted.
- This setting is invalid when "Flatbed" is
specified for "--source".
Blank page skip --blank-page-skip-se [1 to 5] (3) This is enabled when "yes" is specified for
"--blank-page-skip". The determination
sensitivity nsitivity
sensitivity is specified.
1: Less likely to detect blank pages
3: Normal detection setting
5: More likely to detect blank pages
Multifeed --multifeed-detection Do-not-detect This setting is invalid when "Flatbed" is
detection specified for "--source".
Stop
control
Detects --mf-overlapping [=(yes | no)] This setting is enabled when "Stop" is
multifeed by the specified for "--multifeed detection".
overlapping of
documents
Detecting --mf-length [=(yes | no)] This setting is valid when "Stop" is
multifeeds by specified for "--multifeed detection".
the length of
the document
Specifying --prepick [=(yes | no)] - This setting is invalid when "Flatbed" is
whether or not specified for "--source".
to enable - This setting cannot be specified when
pre-pick. the following scanner model is used:
fi-7030

(Continued on next page)

18
Function Option Settable values of Notes

(Syntax) argument
(Bold: Default setting)
JPEG transfer --jpeg [=(yes | no)] - This setting is valid when "Gray" or
"Color" is specified for "--mode".
- This setting controls how to transfer
image data between the scanner
and the computer. The data that is
transferred to an application is
always uncompressed.
JPEG type --jpeg-type 444 This setting is valid when "yes" is
specified for "--jpeg".
422

411

JPEG --jpeg-quality 1 to 7 (4) This setting is valid when "yes" is


specified for "--jpeg".
compression
rate

Continuous --autofeed [=(yes | no)] If ADF is used, a preceding scan is


performed by using the cache
scan
memory in the scanner. Because all
sheets that are loaded in the feeder
are fed, if an application stops the
scanning process along the way, the
scanned images that remain in the
cache memory are discarded.
(*1) fi-7460 and fi-7480 support this size. The other scanner models do not support this size.
(*2) fi-7460 and fi-7480 do not support this size. The other scanner models support this size.
(*3) For available paper sizes, refer to the Operator's Guide of your scanner model.
*Note: The list of these options and settable values is displayed when the command below is executed as
long as this product is installed and the target scanner is turned on and connected to the computer.

scanimage --help

19
9. Driver Operation Specifications for Errors

This describes driver operations for various types of errors when using this product to perform scanning. The
display messages for various types of errors when scanning by "scanimage" are also included for reference.

Error code in Message displayed in


Symptom Operation and corrective action SANE API scanimage
(Reference)
When the USB Operation: Stops a scan and returns an SANE_STATUS Error during device
cable is error. _IO_ERROR I/O
disconnected Corrective action: Reconnect the USB
during the cable to the computer. After that, turn
scanning the scanner off and then on so that the
process scanner is recognized by the computer
again.
When the Operation: Stops a scan and returns an SANE_STATUS Error during device
power cable is error. _IO_ERROR I/O
disconnected Corrective action: Connect the power
during the cable properly. To disconnect and
scanning connect the power cable, an interval of
process 5 or more seconds is required. After
reconnecting the power cable, turn the
scanner on so that the scanner is
recognized by the computer again.
Exit the application and start it again.
When Operation: Stops a scan and returns an SANE_STATUS Error during device
scanning error. _IO_ERROR I/O
without Corrective action: Turn off the scanner,
unlocking the unlock the transport lock, and try
transport lock scanning again.
When there is Operation: Stops a scan and returns an SANE_STATUS Document feeder out
no document error. _NO_DOCS of documents
in the ADF Corrective action: Load the document
during the on the ADF, and try scanning again.
scanning
process
When a Operation: Stops a scan and returns an SANE_STATUS Document feeder
document error. _JAMMED jammed
jammed during Corrective action: Open the ADF cover,
the scanning clear the jam, and then try scanning
process again. If paper jams occur frequently,
clean the inside of the scanner.
(Continued on next page)

20
Error code in Message displayed in
Symptom Operation and corrective action SANE API scanimage
(Reference)
When the ADF Operation: Stops a scan and returns an SANE_STATUS Scanner cover is
cover is error. _COVER_OPEN open
opened during Corrective action: Close the ADF cover,
the scanning return the paper, and then try scanning
process again.
When Operation: Stops a scan and returns an SANE_STATUS Operation was
scanning is error. _CANCELLED cancelled
canceled Corrective action: A document may be
during the remaining in the scanner. Open the
scanning scanner cover and remove the
process document.
When an Operation: Does not a scan and returns SANE_STATUS unrecognized option
incorrect an error. _COVER_OPEN Example:
option was Corrective action: Specify the correct #scanimage
specified option, and then try scanning again. --page-size=A4
>pfu.pnm
#unrecognized option
'--page-size=A4'
When a value Operation: Scans a document after a The scanner rounded value of XX
outside the value is changed to a value within the operates from XX to XX
allowable allowable range. A message appears normally. Example:
range was indicating that the value was changed. #scanimage
specified Corrective action: Not needed. --contrast 128
>pfu.pnm
# rounded value of
contrast from 128 to
127
When there is Operation: Stops a scan and returns an SANE_STATUS Out of memory
not enough error. _NO_MEM
memory Corrective action: Change the settings
during the such as the resolution and the paper
scanning size to reduce the image size and scan
process again. In addition, some parameters
tend to consume memory. Disable the
cropping parameter and the blank page
skip parameter and try again.
If the problem persists, add memory.
When the Operation: Stops a scan and returns an SANE_STATUS Operation was
STOP button error. _CANCELLED cancelled
was pressed Corrective action: A document may be
to cancel remaining in the scanner. Open the
scanning. scanner cover and remove the
document.

21
10. Scan Button Monitoring Tool

This tool monitors the [Scan] button of the scanner and performs a scan by executing the "scanimage"
command when it detects that the [Scan] button was pressed.
The usage procedure is described below.

(1) Monitoring tool starting and stopping procedure


The monitoring tool is not started in the state immediately after installation.
Perform the operation below in the superuser (root) to enable starting and stopping.

Start monitoring tool /etc/init.d/pfufsscanbutton start


Stop monitoring tool /etc/init.d/pfufsscanbutton stop

The monitoring tool must be registered to start it automatically when the system is started.
The system is managed by "update-rc.d".

(2) Output location of image data


When scanning is performed by pressing the [Scan] button, a folder with a name having the current time
is created under the folder below, and the scan image is stored there.
/opt/pfufs/image
The attributes of the scanned image are shown below. Also, the image is output in the format PNM by
default.
Owner: root
Permissions: 644

(3) Changing the scan parameters


When the Scan button is pressed, the scan process is performed based on the configuration file below.
/opt/pfufs/etc/pfufsscanbutton.conf
To change the scan parameters, change the values in the configuration file with the superuser (root) in
any text editor. Due to the "scanimage" specifications, images can be output in tiff or PNM format only. If
necessary, use an application or another tool to convert to other image formats.

Configuration file example: A configuration file with the settings below is saved upon installation.

scanimage --batch --format=pnm --source "Adf-front" –mode Lineart --resolution 300 --autofeed=yes

*Note: The contents of this configuration file cannot be written as a shell script. This file can be used only
as an option for the "scanimage" command.
By default, images are saved in the "/opt/pfufs/image" directory. However, you can change the save

22
destination by using the "batch" option as follows.

scanimage –batch=/tmp/Image-%d.pnm --format=pnm --source "Adf-front" –mode Lineart --resolution 300


--autofeed=yes

(4) Notes
- When the scanner is in use (for example, when a scanning application is using the scanner), the
monitoring tool cannot start scanning even if the [Scan] button is pressed.
On the other hand, when a scan is being performed by the monitoring tool due to the [Scan] button being
pressed, other applications cannot start scanning.
The function to stop/resume scanning with the Scan button is not supported.
- The monitoring tool can monitor only one scanner. When multiple scanners are connected to the computer,
the monitoring tool does not run correctly.
- If you need to save an error message that is generated during a scan, add the path and name to be used for the
output file (for example, "/tmp/err.log") in the “pfufsscanbutton.conf” file as follows:

scanimage --batch --format=pnm --source "Adf-front" –mode Lineart --resolution 300 --autofeed=yes >/tmp/err.log

2>&1

23
11. Management Tool

The management tool allows you to maintain the scanner and configure the settings such as the waiting time
before the scanner enters power saving mode, the period of time before the scanner is automatically turned
off when it is left unused, the magnification level, and the offset value.
Details on how to use this management tool and its functions are described below.

11.1 How to Use This Tool


Specify an option and an argument for the pfufsconsumables command and then execute the command.
root privileges are required depending on the option you specify.

# pfufsconsumables <option> <setting value for an argument>

Example: To configure the settings for the scanner to be automatically turned off

# pfufsconsumables --power-off inactive

11.2 Functions, Options, and Setting Values for Arguments

No Function Option Setting value for Notes


an argument
1 Listing the scanners -L or None The USB bus number and
that are connected --list-devices the port number that are
used to connect the scanner
are listed.
2 Specifying a scanner -d or Scanner If you do not specify this
--device-name name:USB bus option, the scanner that is
number:port detected first is specified.
number For the USB bus number
Example: and the port number,
fi-7030:001:003 specify the values that are
listed when the command is
executed with option "-L" or
"--list-devices" specified.
3 Displaying the Help -h or None The Help information for the
information --help management tool is
displayed.
4 Displaying the version -V or None The version of the
of the management --version management tool is
tool displayed.

(Continued on next page)

24
No Function Option Setting value for an Notes
argument
5 Displaying the --info None The following information about
scanner information the scanner is displayed:
- Scanner name
- Firmware version
- Serial number
- Consumable counters
- Waiting time before the
scanner enters power saving
mode/time period before the
scanner is automatically
turned off when it is left
unused
- Magnification level and offset
value
6 Clearing the number --after-cleaning-clear None The number of sheets scanned
of sheets scanned after cleaning is cleared.
after cleaning Only a user with root privileges
can set this option.
7 Clearing the counter --brake-roller-clear None The counter number for the
number for the brake brake roller is cleared.
roller Only a user with root privileges
can set this option.
8 Clearing the counter --pick-roller-clear None The counter number for the pick
number for the pick roller is cleared.
roller Only a user with root privileges
can set this option.
9 Setting the waiting --sleeptimer 5 to 235 Specify a value for the time (in
time before the (Step: 5) minutes) in multiples of 5.
scanner enters power If you specify a value that is not
saving mode in multiples of 5, the value that
is rounded down to the nearest
multiple of 5 is set.
Only a user with root privileges
can set this option.
10 Setting the time period --power-off inactive Specify an option to keep the
before the scanner is 1-hour scanner on even when it is left
automatically turned 2-hours unused or specify a time period
off when it is left 4-hours before the scanner is
unused 8-hours automatically turned off.
Select "1-hour", "2-hours",
"4-hours", or "8-hours" for the
time period.
Only a user with root privileges
can set this option.

(Continued on next page)

25
No Function Option Setting value for Notes
an argument
11 Setting the --adf-front-offset-main -4 to 4 (*0.5 mm) Specify the ADF front offset value for
offset value (Step: 1) main scanning.
Only a user with root privileges can set
this option.
--adf-front-offset-sub Specify the ADF front offset value for
sub scanning.
Only a user with root privileges can set
this option.
--adf-front-offset-end-of-pa Specify the ADF front offset value for
ge the bottom edge of the document.
Only a user with root privileges can set
this option.
--adf-back-offset-main Specify the ADF rear offset value for
main scanning.
Only a user with root privileges can set
this option.
--adf-back-offset-sub Specify the ADF rear offset value for
sub scanning.
Only a user with root privileges can set
this option.
--adf-back-offset-end-of-pa Specify the ADF rear offset value for the
ge bottom edge of the document.
Only a user with root privileges can set
this option.
--flatbed-offset-main Specify the flatbed offset value for main
scanning.
Only a user with root privileges can set
this option.
--flatbed-offset-sub Specify the flatbed offset value for sub
scanning.
Only a user with root privileges can set
this option.
12 Setting the --adf-magnification-adjustm -3.1 to 3.1% Specify the magnification level
magnification ent (Step: 0.1) adjustment for the ADF.
level Only a user with root privileges can set
this option.
--flatbed-magnification-adju Specify the magnification level
stment adjustment for the flatbed.
Only a user with root privileges can set
this option.

*If you specify two or more options from No.1, No.3, No.4, and No.5 at the same time, only the first option is applied.

For example, when the following command is executed, only the version information is displayed.

pfufsconsumables -V --info

*If you specify an option from No.1, No.3, No.4, and No.5 and an option from No.6 through No.12 at the same time, the

option from No.6 through No.12 is not applied.

For example, when the following command is executed, the version information is displayed, but the waiting time before

the scanner enters power saving mode is not applied.

pfufsconsumables --sleeptimer 60 -V

26
*Option No.6 and subsequent options can be specified only when the management tool is executed by the superuser (root

user). These options cannot be specified by a general user. In addition, option No.6 is not displayed when "--help" is

specified.

*To output the displayed results of the scanner status into a text file by using the management tool, execute the following

command:

For example:"result_of_info.txt” in the following command is an arbitrary text file name.

pfufsconsumables --info > result_of_info.txt

*Notes

Make sure that you start the management tool before operating the operator panel or perform a scan with the scanner.

27
11.3 Models and Supported Functions
The following table shows which model each function (option) is supported with.

Function Scanner model


(Option)
fi-7140 fi-7240
fi-7160 fi-7260 fi-7030
fi-7180 fi-7280
fi-7460
fi-7480
Listing the scanners that are connected (-L or --list-devices) Yes Yes Yes
Specifying a scanner (-d or --device-name) Yes Yes Yes
Displaying the Help information (-h or --help) Yes Yes Yes
Displaying the version of the management tool (-V or --version) Yes Yes Yes
Displaying the scanner information (--info) Yes Yes Yes
Clearing the number of sheets scanned after cleaning (--after-cleaning-clear) Yes * Yes * Yes *
Clearing the counter number for the brake roller (--brake-roller-clear) Yes * Yes * Yes *
Clearing the counter number for the pick roller(--pick-roller-clear) Yes * Yes * Yes *
Setting the waiting time before the scanner enters power saving mode Yes * Yes * Yes *
(--sleeptimer)
Setting the time period before the scanner is automatically turned off when it is left Yes * Yes * Yes *
unused (--power-off)
Setting the ADF front offset value for main scanning Yes * Yes * Yes *
(--adf-front-offset-main)
Setting the ADF rear offset value for main scanning Yes * Yes * Yes *
(--adf-front-offset-sub)
Setting the offset value

Setting the ADF front offset value for the bottom edge of the document No No Yes *
(--adf-front-offset-end-of-page)
Setting the ADF rear offset value for main scanning Yes * Yes * Yes *
(--adf-back-offset-main)
Setting the ADF rear offset value for sub scanning Yes * Yes * Yes *
(--adf-back-offset-sub)
Setting the ADF rear offset value for the bottom edge of the document No No Yes *
(--adf-back-offset-end-of-page)
Setting the flatbed offset value for main scanning No Yes * No
(--flatbed-offset-main)
Setting the flatbed offset value for sub scanning No Yes * No
(--flatbed-offset-sub)
Setting the magnification level adjustment for the ADF Yes * Yes * Yes *
(--adf-magnification-adjustment)
Setting the magnification level adjustment for the flatbed No Yes * No
--flatbed-magnification-adjustment
* Only a user with root privileges can set this option.

11.4 Return Values


This section describes the return values of the management tool.
Return value Description
0x00 Applying the specified settings or clearing the counter number was successfully
completed.
Value other than 0x00 An error has occurred.
Applying the specified settings or clearing the counter number failed.

28
Appendix: Basic Knowledge for Using Linux Drivers

1. Linux
Many different types of Linux distributions are available around the world. A Linux distribution includes a
Linux kernel module that is released for free, libraries, command components, and applications. In
addition, a Linux distribution is on the DVD provided or other distributable media.
Well-known distributions are Debian, Ubuntu, Redhat, CentOS, and OpenSUSE. Each distribution has a
different aspect, such as bundled applications, a GUI system, a support system, or a bug fix frequency.
- Debian: For general use.
- Ubuntu: For desktops. This is a Debian based version that is optimized for desktops.
- Redhat (Red Hat Enterprise Linux): For server systems. This is a commercial based version and
is supported by Red Hat for a fee.
- CentOS: A clone of Red Hat Enterprise Linux. Trademarks are removed from this distribution so
that users can use this for free.
- OpenSUSE: For general use. Novell supports the development of this distribution. This is the
commercial based version (SuSE Enterprise Linux).

PFU conducted the development for the driver and support based on the Ubuntu distribution because of
its market share and high versatility.

1.1. Ubuntu
Ubuntu 18.04 LTS includes the scanner driver (SANE 1.0.27) for free. At this point, the majority of fi Series
scanners and ix500 scanners can use this driver.

*Note 1: Ubuntu 14.04 LTS also includes a free scanner driver, but because the driver is older (SANE
1.0.24), it does not work when the scanner is connected to the computer via the USB 3.0
controller.

The following describes how to obtain Ubuntu18.04 LTS and how to install it.
(1) Obtaining an OS image
An OS Image (ISO format) can be obtained from the site below. This site is mirrored by organizations in
various countries. Because the network environment varies in each country, be sure to select the most
suitable site.
●Download site
[Original site]
http://releases.ubuntu.com/18.04/

[Example of a mirror site: Japan Advanced Institute of Science and Technology]


http://ftp.jaist.ac.jp/pub/Linux/ubuntu-releases/18.04/

29
●ISO image to be downloaded
(for 64-bit systems) ubuntu-18.04-desktop-amd64.iso
*Note: A screen asking for a donation may appear when attempting to download an OS image by following the
URL from the original website for Ubuntu.
*If you do not know the nearest mirror site to you, search for the above ISO image file name, and find which
site is the nearest to you from among the URLs of the displayed sites based on the country name.

(2) How to install Ubuntu18.04 LTS


There are three methods for installing Ubuntu18.04 LTS. Methods (a) and (b) allow you to keep your
Windows computer environment as it is and use Ubuntu 18.04 LTS.
(a) Install the virtualization software such as VirtualBox and VMware on Windows.
(b) Burn the ISO image to a burnable disc such as a DVD, and then start Linux from the DVD. Linux runs
in the memory without installing to the computer hard disk.
(c) Install Ubuntu 18.04 LTS on your computer from the DVD.

If you proceed with method (a), install the virtualization software in advance. For the installation method,
refer to the install instructions of each software.
After you prepare the virtualization environment, proceed with the installation steps by referring to the
following website:
http://www.ubuntu.com/download/desktop/install-ubuntu-desktop

If you proceed with method (b), refer to the following website for the installation:
http://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install

If you proceed with method (c), refer to the following website for the installation:
http://www.ubuntu.com/download/desktop/install-ubuntu-desktop

30
2. Scanners on Linux Platform
2.1. SANE API

The APIs for scanners in Windows OS include TWAIN and ISIS, and the API for scanners in Linux OS is
called SANE.
SANE API can be used to operate a scanner using one of the two methods below.
(1) Method for using the scanner application included in Linux OS
Scanner applications ("scanimage", "xsane", "simple-scan", etc.) that support SANE API are included in
the typical Linux OS. The scanner can be used from these applications.

For example, by calling the "scanimage" command from the user application, a scanned image can be
output as a file. In this case, you can develop your application without any regard to SANE API.

(2) Method of creating an application using SANE API


This driver has a function calling interface based on SANE API (14 functions including "sane_open()",
"sane_start()", and "sane_read()"). These functions can be used to create a unique application in C
language.

The points to take into consideration when using SANE API are shown below.
- In contrast to the scanner driver for Windows, no GUI setting screen is included, and the functions are
generally limited, which results in an extremely small size. For this reason, distribution is easy, and it is ideal
as an element for creating mechanisms with limited disk resources such as thin clients.
- In SANE API, the driver cannot create files. Transfer of image data to applications uses uncompressed
memory transfer only. For this reason, JPEG and PDF creation functions are assigned to applications at the
calling side. Generally, the Linux OS includes file format conversion tools, and so after scanning, the
application calls these tools to create the target file format.

2.2. SANE API Function Interface


The driver that supports SANE API provides the functions below. By calling the following functions from the
application, the scanner can be controlled.

sane_init() - Initialize scanner library


sane_exit() - Exit scanner library
sane_get_device() - Get scanner device
sane_open() - Open scanner device
sane_close() - Close scanner device
sane_get_option_description() - Get option parameters
sane_control_option() - Set option parameter values
sane_get_parameters() - Get option parameter values
sane_start() - Start scan
sane_read() - Read data from scanner
sane_cancel() - Cancel scanner operation
sane_set_io_mode() - Set I/O mode
sane_get_select_fd() - Get file descriptor
sane_strstatus() - Get file status

For details, refer to the link below. SANE API is in a public domain, and it can be used by anyone without
restrictions.
SANE API Specifications http://www.sane-project.org/sane.ps

31
2.3. Scanning Software

The scanning applications that can be used in Ubuntu are shown below.
Tool name Description
scanimage Scanning application for command line based operation.
Command line options can be used to specify detailed settings for
scanning.
xsane Scanning application for a GUI environment. Detailed settings can
be specified when scanning in a GUI screen.
simple-scan Scanning application for a GUI environment. This has an extremely
simple structure, and it is easy to use, but as a result, detailed
options cannot be specified.

*Notes
The above-mentioned software and software described starting from the next section are all Linux freeware.
PFU uses the above-mentioned "scanimage" and "xsane" to evaluate the Linux drivers, but no operation
guarantee or support is provided for "scanimage" and "xsane" themselves. This document is intended to
provide a description of how to use the Linux drivers only. The freeware listed starting from the next section is
also unsupported. Because it is highly likely that the customer is using this software, this software is
introduced here so that the readers of this manual can gain some familiarity with it.

2.4. Scanimage Usage Examples

This explanation assumes that the computer and scanner are connected by a USB cable and power is being
supplied to them.
(1) Open the terminal software.
(2) Load paper into the hopper.
(3) Execute the "scanimage" command. When this is executed, the scan operation is performed, and
the specified file is created.

scanimage --format=tiff --batch=sample-image.tiff

Example - when scanning with the settings: resolution 300, gray, dropout red, and output file format tiff

scanimage --mode Gray --resolution 300 --batch=ImageFile-%d.tiff --format=tiff --dropoutcolor Red

Example - when scanning with the settings: resolution 100, color, contrast 30, and output file format tiff

scanimage --mode Color --resolution 100 --batch=ImageFile-%d.tiff --format=tiff –contrast 30

32
* The "scanimage" command is open source. Any unclear points about an operation can be checked using the
source code.
The scanimage for each Linux OS can be obtained from the respective distributor. The latest version can be
obtained from the site below.
http://www.sane-project.org/
* In addition to the options supported by the driver, the options for batch processing and other operations by
the "scanimage" command itself can also be specified in "scanimage". This appears as shown below.
[Ex:Ubuntu18]

root:/home/pfu# scanimage --help

Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write image data to

standard output.

Parameters are separated by a blank from single-character options (e.g.

-d epson) and by a "=" from multi-character options (e.g. --device-name=epson).


-d, --device-name=DEVICE use a given scanner device (e.g. hp:/dev/scanner)

--format=pnm|tiff|png|jpeg file format of output file

-i, --icc-profile=PROFILE include this ICC profile into TIFF file

-L, --list-devices show available scanner devices

-f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the output

can be specified: %d (device name), %v (vendor),

%m (model), %t (type), %i (index number), and

%n (newline)

-b, --batch[=FORMAT] working in batch mode, FORMAT is `out%d.pnm' `out%d.tif'

`out%d.png' or `out%d.jpg' by default depending on --format

--batch-start=# page number to start naming files with

--batch-count=# how many pages to scan in batch mode

--batch-increment=# increase page number in filename by #

--batch-double increment page number by two, same as

--batch-increment=2

--batch-print print image filenames to stdout

--batch-prompt ask for pressing a key before scanning a page

--accept-md5-only only accept authorization requests using md5

-p, --progress print progress messages

-n, --dont-scan only set options, don't actually scan

-T, --test test backend thoroughly

-A, --all-options list all available backend options

-h, --help display this help message and exit


-v, --verbose give even more status messages

-B, --buffer-size=# change input buffer size (in kB, default 32)
-V, --version print version information

33
2.5. "xsane" Usage Example

The procedure for scanning by "xsane" is shown below.


This explanation assumes that the computer and scanner are connected by a USB cable and power is being
supplied to them.
(1) Open the terminal software.
(2) Execute the "xsane" command. When this is executed, a tool with a GUI setting screen is started.

xsane

(3) In the GUI setting screen, check or change the resolution, scan mode, paper size, and other settings.
(4) Load paper into the hopper.
(5) If the [Scan] button is clicked on the GUI setting screen, the scan process is started.
(6) Once the scan is completed, operation is performed based on the output method that was set
beforehand.

34
*Notes
Because "xsane" is not included in the distributions for Ubuntu 14 and 16, it cannot be used immediately after
Linux is installed. To use "xsane", the package must be downloaded from the Ubuntu distributor. To download
and install the package, follow the procedure below.

Preparation:
Establish an Internet connection on a computer.
Download Procedure:
Use the following procedure to download the files.

(1) Open the terminal software.


(2) Execute the "sudo" command, enter the password for the superuser (root user) to become a root user.
sudo su -
(3) Use the command below to connect to the Ubuntu server and check the latest package information, and
then download it.
apt-get update
apt-get install xsane

- In environments using a proxy server to connect to the Internet, settings may be required for the system.
Make the settings based on the specific proxy server environment.

2.6. Image Conversion of an Output Image


SANE API does not have an interface for outputting a file. As a result, the driver does not have a function to
output an image data as a file. A scanning application or similar program is required to create the file. Typical
Linux operating systems include tools for image conversion. Some examples are the "convert" command and
"mogrify" command provided in ImageMagick (group of tools for using, editing, and viewing images). These
commands can be used to convert the TIFF format file created by "scanimage" to the target format.

- Example of image conversion of a single TIFF format file to JPEG format

convert TIFFfilename.tiff JPEGfilename.jpeg

- Example of image conversion of all JPEG files in the current directory to PNG format

for pic in *.jpg

do

convert ${pic} `basename ${pic} .jpg`.png

done

- Example of image conversion of all TIFF files in the current directory to JPEG format

mogrify -format jpeg *.tiff

35
*ImageMagick supports more than 100 types of image file formats including GIF, JPEG, JPEG 2000,
PNG, PDF, Photo CD, TIFF, and DPX. For details about the usage procedure, refer to the site below.

http://www.imagemagick.org/

*ImageMagick may not be installed for certain Linux OS installation methods. If this happens, perform an
additional installation using the method for the respective Linux OS.

For Ubuntu, ImageMagick can be installed from the Ubuntu Software Center.

36

You might also like