Network Scan Drivers

User's Guide

September 2008 www.lexmark.com

Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc., registered in the United States and/or other countries. All other trademarks are the property of their respective owners. © 2008 Lexmark International, Inc. All rights reserved. 740 West New Circle Road Lexington, Kentucky 40550 Edition notice September 2008 The following paragraph does not apply to any country where such provisions are inconsistent with local law: LEXMARK INTERNATIONAL, INC., PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in later editions. Improvements or changes in the products or the programs described may be made at any time. References in this publication to products, programs, or services do not imply that the manufacturer intends to make these available in all countries in which it operates. Any reference to a product, program, or service is not intended to state or imply that only that product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any existing intellectual property right may be used instead. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by the manufacturer, are the user’s responsibility. For Lexmark technical support, visit support.lexmark.com. For information on supplies and downloads, visit www.lexmark.com. If you don't have access to the Internet, you can contact Lexmark by mail: Lexmark International, Inc. Bldg 004-2/CSC 740 New Circle Road NW Lexington, KY 40550 USA © 2008 Lexmark International, Inc. All rights reserved. UNITED STATES GOVERNMENT RIGHTS This and any accompanying documentation provided under this agreement are commercial computer software and documentation developed exclusively at private expense. Trademarks Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc., registered in the United States and/or other countries. All other trademarks are the property of their respective owners. Contents Edition notice...... 2 Introduction to the network scan driver...... 5 Installing the network scan driver...... 5 System requirements ...... 5 Supported operating systems...... 5 Installing on Red Hat, Red Flag, Linpus, or SUSE ...... 5 Installing on , , or Linux...... 6 Using the network scan driver...... 6 Removing the network scan driver...... 6

How Do I...?...... 7 Scan using XSane...... 7 Scan using OpenOffice.org...... 7 Scan using GIMP...... 7 Scan using the command line...... 8 Scan multiple pages...... 8 Scan both sides of the page...... 10 Import all scanned pages at once...... 11 Adjust the scan settings using XSane and OpenOffice.org ...... 11 Adjust the scan settings using scanimage...... 13 Set default scan options...... 15 Check to see if the network scan driver is installed...... 15 Cancel a scan...... 16

Troubleshooting...... 17 The printer scans the page, but nothing happens on the host computer...... 17 The printer starts scanning, but suddenly stops or prints a “Profile scan failed” page...... 17 Disable any firewall...... 17 Open the required scanning ports (tcp: 9751-9760)...... 17 Accept the device certificate ...... 18 Enter a scan profile login...... 18 When scanning from the ADF, only one page is imported to the application...... 18 When scanning from the ADF, the profile is posted between each page...... 19 My printer is not compatible...... 19 SANE does not recognize the network scan driver...... 19

Contents 3 I want to change the display language of my application...... 19 XSane displays garbage characters in the scan options...... 19

Index...... 21

Contents 4 Introduction to the network scan driver

The network scan driver provides a SANE () interface to allow scanning from a network-based printer.

Installing the network scan driver

System requirements Before installing the network scan driver, make sure: • You are logged on with root user authority. • You have 62MB of free disk space available for a complete installation. • You have SANE and/or SANE back ends installed on your server. • The host computer is properly configured to communicate with a supported network printer over TCP/IP. • Your printer has an internal network card and can communicate via an IPv4 network. External network adapters are not supported.

Supported operating systems Make sure you are running any of the following Linux distributions: • Debian GNU/Linux • Linspire Linux • • SUSE Linux • Ubuntu Linux • Note: For specific supported versions, see the Web site for your operating system, or see the file /usr/lexscan/docs/supported-platforms.txt after installation.

Installing on Red Hat, Red Flag, Linpus, or SUSE Linux 1 Read “System requirements” on page 5. 2 Download the driver: a Go to www.lexmark.com. b Select Driver Finder from the Drivers & Downloads drop-down list. c Choose the running on your host computer. d Select network-scan-linux-glibc2-.rpm and download it to your computer. 3 Save the downloaded package in any directory. 4 Install the package file: rpm -ivh network-scan-linux-glibc2-x86.rpm

Introduction to the network scan driver 5 Installing on Debian, Linspire, or Ubuntu Linux 1 Read “System requirements” on page 5. 2 Download the driver: a Go to www.lexmark.com. b Select Driver Finder from the Drivers & Downloads drop-down list. c Choose the Linux distribution running on your host computer. d Select network-scan-linux-glibc2-x86. and download it to your computer. 3 Save the downloaded package in any directory. 4 Install the package file: -i network-scan-linux-glibc2-x86.deb

Using the network scan driver To use the network scan driver, you must open a SANE-compliant application, such as XSane or scanadf. From within the application, select the network printer and the settings to use for the scan. The host computer searches for an open port to establish a connection. Once port 443 is found open, the printer validates the device security certificate. If the printer requires authentication, the printer validates the user name and password from the host. The application submits the settings and information about the host computer to the selected printer as a profile. From the printer control panel, select your profile. Once the scan is done, the image is displayed or saved by the application.

Removing the network scan driver 1 In the command line, type rpm -e lexmark-network-scan ( if you are running Red Hat or SUSE Linux) or dpkg -r lexmark-network-scan (if you are running Debian GNU/Linux or Linspire Linux.). 2 Remove the lexmark_nscan entry from the /etc/sane.d/dll.conf file.

Introduction to the network scan driver 6 How Do I...?

Scan using XSane 1 In the command line, type xsane. The XSane main window appears. 2 From the menu bar, choose Window Œ Show standard options. 3 Specify the IP address of your printer. 4 If necessary, adjust other scan settings. For more information, see “Adjust the scan settings using XSane and OpenOffice.org ” on page 11. 5 From the XSane main window, click Scan. 6 Place the document to be scanned in the ADF or on the scanner glass. 7 From the printer, choose your profile. For more information, see the documentation that came with your printer.

Scan using OpenOffice.org 1 Start OpenOffice.org. 2 From the menu bar, choose Insert ŒPicture ŒScan ŒSelect Source... or Insert ŒGraphics ŒScan ŒSelect Source.... 3 From Options, choose ip-address. 4 Specify the IP address of your printer in the ip-address field. 5 Choose other options, if necessary, and select OK. 6 From the menu bar, choose Insert ŒPictureŒScan ŒRequest... or Insert ŒGraphicsŒScan ŒRequest.... 7 Place your document in the ADF or on the scanner glass. 8 From the printer, choose your profile. For more information, see the documentation that came with your printer.

Scan using GIMP GNU Image Manipulation Program (GIMP) is the standard paint program for UNIX/Linux systems. It supports scanning by using existing scanning tools (xscanimage and XSane) used as plug-ins. The GIMP plug-in function allows xscanimage and XSane to provide the scanned image back to the program. Note: The GIMP plug-in that ships with your OS should already be installed. 1 Start GIMP. 2 From the menu, choose File ŒAcquire ŒXSane device or xscanimage:device. The XSane or scanimage window appears. 3 From the menu bar, choose Window Œ Show standard options. 4 Specify the IP address of your printer.

How Do I...? 7 5 If necessary, adjust other scan settings. For more information, see “Adjust the scan settings using XSane and OpenOffice.org ” on page 11. 6 From the XSane main window, click Scan. 7 Place the document to be scanned in the ADF or on the scanner glass. 8 From the device, choose your profile. For more information, see the documentation that came with your printer.

Scan using the command line 1 From the command line, type scanimage --ip-address= > /tmp/scan.pnm. 2 Adjust the scan settings, if necessary. For more information, see “Adjust the scan settings using scanimage” on page 13. Note: If an Assertion 'c->xlib.lock' failed error occurs using openSUSE 10.3, refer to http://en.opensuse.org/Xlib.lock for troubleshooting information.

Scan multiple pages The default paper source for scanning is the ADF. If there are no documents loaded in the ADF, the printer will scan from the scanner glass. Depending on the application you are running, you can scan multiple pages in several ways. Application Method scanimage From the command line, type scanimage -b --source=”Multiple Pages” --i p-address= scanadf From the command line, type scanadf --source=”Multiple Pages” --ip-add ress=

How Do I...? 8 Application Method OpenOffice.org 1 Start OpenOffice.org. 2 From the menu, choose Insert ΠPicture ΠScanΠSelect Source or Insert ΠGraphics ΠScanΠSelect Source. 3 From Options, choose ip-address. 4 Specify the IP address of the printer in the ip-address field. 5 From Options, choose Image Settings Πsource. 6 From the drop-down menu, choose Multiple Pages. 7 Click OK. 8 From the OpenOffice.org menu, choose Insert ΠPicture ΠScanΠRequest or Insert ΠGraphics ΠScanΠRequest. The printer scans all pages. Then, the first page is imported into your document. 9 From the OpenOffice.org menu, choose Insert ΠPicture ΠScan ΠRequest or Insert ΠGraphics ΠScan ΠRequest to import the second page, or until all the pages are imported into your document. XSane 1 From the command line, type xsane. 2 From the XSane main window, choose Multiple Pages. 3 From the menu bar, choose Window ΠShow standard options. 4 Specify the IP address of your printer. 5 From the XSane main window, click Scan. The first page of your document appears. 6 Click Scan until all the pages of your document appear. To have all the pages appear at once (XSane .99 and later) 1 From the XSane main window, specify the number of pages you want scanned using the spin box in XSane options. 2 Click Scan. If you specify a number that is smaller than the number of pages placed in the ADF, only the number of pages specified are scanned. You must click Scan again to scan the remaining pages. To have all the pages appear at once (XSane versions earlier than .99) 1 From the XSane main window, choose Preferences ΠSetup. 2 Click the Enhancement Tab. 3 From the ADF Modus drop-down menu, choose Scan Multiple Page. 4 Scan your document.

How Do I...? 9 Scan both sides of the page

Notes: • You must have a duplex scanner. • You must use the ADF. Depending on the application you are running, you can scan both sides of the page in several ways. Application Method scanimage In the command line, type scanimage -b --scan-both-sides=yes --ip-ad dress= scanadf In the command line, type scanadf --scan-both-sides=yes --ip-address =

OpenOffice.org 1 Start OpenOffice.org. 2 From the OpenOffice.org menu, choose Insert ΠPicture ΠScanΠSelect Source... or Insert ΠGraphics ΠScanΠSelect Source.... 3 From Options, choose ip-address. 4 Specify the IP address of your printer in the ip-address field. 5 From Options, choose Image Settings Πsource. 6 From the drop-down menu, choose Multiple Pages. 7 From Options, choose Image Settings Πscan-both-sides. 8 Click the checkbox beside scan-both-sides. 9 Click OK. 10 From the OpenOffice.org menu, choose Insert ΠPicture ΠScanΠRequest... or Insert ΠGraphics ΠScanΠRequest.... The printer scans all pages. Then, the first page is imported into your document. 11 From the OpenOffice.org menu, choose Insert ΠPicture ΠScan ΠRequest... or Insert ΠGraphics ΠScan ΠRequest... to import the second page, or until all the pages are imported into your document.

How Do I...? 10 Application Method XSane 1 In the command line, type xsane. 2 From the XSane main window, choose Multiple Pages. 3 From the menu bar, choose Windows ΠShow standard options. 4 Specify the IP address of your printer. 5 Make sure that the checkbox beside Scan both sides is selected. 6 Click Scan. The first page of your document appears. 7 Click Scan until all the pages of your document appear. To have all the pages appear at once: 1 From the XSane main window, choose Preferences ΠSetup. 2 Click the Enhancement Tab. 3 From the ADF Modus drop-down menu, choose Scan Multiple Page. 4 Scan your document.

Import all scanned pages at once Note: You should be running XSane to import all scanned pages at once. 1 From the XSane main window, choose Preferences Œ Setup. 2 Click the Enhancement Tab. 3 From the ADF Modus drop-down menu, choose Multiple Pages. 4 Scan your document. For more information, see “Scan multiple pages” on page 8.

Adjust the scan settings using XSane and OpenOffice.org Depending on the application you are running, do either of the following to access the scan options: • From the menu bar of the XSane main window, click Window ŒShow standard options or Window ŒShow advanced options. • From the OpenOffice.org menu, click Insert ŒPicture Œ Scan Œ Select Source or Insert Œ Graphics Œ Scan Œ Select Source.

Choose To IP Address Specify the IP address of the scanner. User Name Specify the user name.

How Do I...? 11 Choose To Profile Name Specify a profile name that will be posted to the printer. The Profile Name should be unique within a user name. However, a profile name can be used more than once provided that it is being used by different user names. Content Type Select the kind of document being scanned. Resolution Select the scan resolution. All the resolutions of all the printers are displayed as options. Make sure that the resolution you select is supported by the printer you will scan to. Color depth Select the color depth. Note: Color depth appears on the XSane main window. Original Size Specify the size of the document being scanned. All the document sizes of all the printers are displayed as options. Make sure that the option you select is supported by the device you will scan to. Scan both sides Perform a duplex scan. Make sure that the selected device has a duplex scanner. Orientation Select portrait or landscape. Brightness Select the brightness from 1–9. Contrast Select the contrast from 0–5. Scan Source Specify if you are scanning a single-sheet or a multiple-page document. Note: Scan Source appears on the XSane main window. Negative Image Specify if you want to invert pixel values. Background Removal Remove the smudges and light background shading on color documents being scanned. Color Dropout Specify the color you want to remove. Color Dropout Threshold Select the color dropout quality from 0–254. Mirror Image Produce a mirror image of the scanned document.

Note: Your printer may not support all the options. To check, see the documentation that came with your printer.

How Do I...? 12 Adjust the scan settings using scanimage The scanimage application is a command-line-only application that uses the first scanner found and the scan setting defaults. The command initiates the scan and stores the image in a PXM or TIFF format. You can provide command line options to specify the scan settings.

Command Option Values Function ip-address IP address of the printer Specify the IP address of the printer. user-name User Name Specify the user name. profile-name Profile Name Specify a profile name that will be posted to the printer. The Profile Name should be unique within a user name. However, a profile name can be used more than once provided that it is being used by different user names. content-type Text Select the kind of document being Text/Graphics scanned. Photo scan-resolution 75 Select the scan resolution. All the 150 resolutions of all the printers are 200 displayed as options. Make sure that the resolution you select is 300 supported by the printer you will 400 scan to. 600 mode 1-bit Black & White Select the color depth. 8-bit Grayscale 24-bit Color

How Do I...? 13 Command Option Values Function original-size Letter Specify the size of the document Executive being scanned. All the document Legal sizes of all the printers are displayed as options. Make sure A3 that the option you select is A4 supported by the printer you will A5 scan to. A6 B4 B5 JIS-B5 Tabloid Oficio (Mexico) Folio Statement Universal Custom Scan Size ID Card 3x5 Photo 4x6 Photo Business Card Book Original Auto Size Mixed Size scan-both-sides no Perform a duplex scan. Make sure yes that the selected device has a duplex scanner. orientation portrait Select portrait or landscape. landscape brightness 1–9 Select the brightness from 1–9. contrast 0–5 Select the contrast from 0–5. source Single Page Specify if you are scanning a Multiple Pages single-sheet or a multiple-page document. negative-image false Specify if you want to invert pixel true values. background-removal -4–+4 Remove the smudges and light background shading when scanning color documents.

How Do I...? 14 Command Option Values Function color-dropout None Specify the color you want to Red remove. Green Blue color-dropout-threshold 0–254 Select the color dropout quality from 0–254. mirror-image false Produce a mirror image of the true scanned document.

For example, to initiate a scan given these settings:

IP address 192.168.1.10 Profile name Application Size of original document Legal From the command line, type scanimage --ip-address=192.168.1.10 --profile-name=Application original-size=Legal > /tmp/image.pxm.

Notes: • You can also type scanimage --help to get a list of options. • Your printer may not support all the options. To check, see the documentation that came with your printer.

Set default scan options All default scan options are stored in the scan driver configuration file, /etc/sane.d/lexmark_nscan.conf. Changing the values in the scan driver configuration file updates the default settings. The settings are reflected in the application. XSane stores the most recently used scan settings in the ${HOME}/.sane/xsane directory. In order for XSane to reflect the changes you made in the scan driver configuration file: 1 From the menu bar, choose File ΠQuit. 2 In the command line, type rm -f ${HOME}/.sane/xsane/*.drc. 3 Restart XSane.

Check to see if the network scan driver is installed The network scan driver will only be found if it has been installed and added to the dll.conf file, and the device file is present. To list the currently available device, type scanimage -L in the command line. Once the device is found, device 'lexmark_nscan:/usr/lexscan/scanner' is a Lexmark Network Scan Driver is displayed on the console.

How Do I...? 15 Cancel a scan After initiating a scan, do one of the following to cancel it: • From the dialog that appears on the computer screen, select Cancel Scan Profile. • From the menu bar, choose File Œ Quit. • From the printer, cancel the scan job. Then, cancel the scan from the status window. For more information on how to cancel a scan job, see the documentation that came with your printer.

How Do I...? 16 Troubleshooting

The printer scans the page, but nothing happens on the host computer. The IP address of the computer that submits the profile is provided to the printer. This IP address will be the address that is currently assigned to your computer's host name. A problem occurs when this IP address does not match the IP address that is assigned to your network interface. To see if this is the problem, try the following: 1 In the command line, type hostname. The host name of the computer appears. 2 In the command line, type ping . 3 Type /usr/lexscan/bin/lsinet in the command line and make sure that the IP address listed matches the IP address provided by 2. If the two IP addresses do not match, you can either correct your /etc/hosts or DNS entries so that they match or update the SANE driver configuration file and specify the appropriate network interface to use. For more information on how to correct your /etc/hosts or DNS entries, see the documentation that came with your operating system. If the problem is not resolved, see “The printer starts scanning, but suddenly stops or prints a “Profile scan failed” page” on page 17.

The printer starts scanning, but suddenly stops or prints a “Profile scan failed” page The IP address of the computer that submits the profile is provided to the printer. The submitting computer then opens a network port and listens for incoming connections from the printer. The computer starts with network port tcp:9751 and progresses to tcp:9752 and so on until it finds an open port. When the printer starts scanning, it tries to open a network connection back to the submitting computer. The submitting computer cannot establish a connection or cancels the scan job if it has a firewall enabled, did not accept the device certificate authentication, or canceled the scan profile login process.

DISABLE ANY FIREWALL To determine how to disable or enable your firewall, see the documentation that came with your operating system.

OPEN THE REQUIRED SCANNING PORTS (TCP: 9751-9760) For most Linux distributions, you can open specific ports with the iptables command. For example, type # iptables -I INPUT -p tcp --dport 9751:9760 -j ACCEPT -i eth0 from the command line.

Troubleshooting 17 ACCEPT THE DEVICE CERTIFICATE If there was an error verifying a security certificate before completing a scan, you need to accept the certificate to proceed with the scanning. You may accept the certificate for a single scan attempt or for all future scan attempts.

ENTER A SCAN PROFILE LOGIN If a 401 Unauthorized Error is received when attempting to send a scan profile to the device, you need to enter a valid user name and password combination. You may enter the valid user name and password combination for a single operation or for all future operations.

When scanning from the ADF, only one page is imported to the application. Depending on the application you are running, there are two reasons why this occurs: • If you are running OpenOffice.org, the source is set to Single Page. • If you are running XSane, the ADF Modus (located in the XSane setup window) is set to (none) or Scan Multiple Page, but the source (located in the XSane main window) is set to Single Page. If you are running OpenOffice.org: 1 From the OpenOffice.org menu, choose Insert Œ Picture Œ Scan ŒSelect Source... or Insert Œ Graphics Œ Scan ŒSelect Source.... The back end appears. 2 Under Options, choose Image Settings Œ source. 3 From the drop-down menu, choose Multiple Pages. 4 Click OK. 5 From the OpenOffice.org menu, choose Insert Œ Picture Œ Scan ŒRequest... or Insert Œ Graphics Œ Scan ŒRequest.... All the pages are scanned. The first page is imported to the application. 6 To import the second page, choose Insert Œ Picture Œ Scan ŒRequest... from the OpenOffice.org menu. 7 Repeat step 6 until all the pages are imported to the application. If you are running XSane: 1 From the drop-down menu next to the scanner icon, choose Multiple Pages. The pages are scanned, and the first scanned page appears. 2 To display the second page, select Scan. 3 Repeat step 2 until all the pages appear. Note: To import all the pages at once, “Import all scanned pages at once” on page 11.

Troubleshooting 18 When scanning from the ADF, the profile is posted between each page. Depending on the application you are running, there are two reasons why this occurs: • If you are running scanadf, the source is set to Single Page. • If you are running XSane, the ADF Modus (located in the XSane setup window) is set to Multiple Pages, but the source setting (located in the XSane main window) is set to Single Page. If you are running scanadf, type: scanadf --source=”Multiple Pages” --ip-address=; or scanimage -b --source=”Multiple Pages” --ip-address= If you are running XSane: In the XSane main window, choose Multiple Pages from the drop-down menu next to the scanner icon.

My printer is not compatible. The device you are using is not a multifunction printer, or it is an older model that the network scan driver does not support. For more information, see the documentation that came with your printer.

SANE does not recognize the network scan driver. The possible causes of this problem are: • The scan driver is not installed in the /usr/lib/sane directories. • The scan driver device file does not exist. • The scan driver is not listed in the /etc/sane.d/dll.conf file. Make sure your SANE installation is using the directory structure /usr/lib/sane and /etc/sane.d/. For some SANE installations, you may need to set the LD_LIBRARY_PATH. In the command line, type export LD_LIBRARY_PATH=/usr/lib. Verify that 'lexmark_nscan' is listed in the /etc/sane.d/dll.conf file and not commented out.

I want to change the display language of my application. Currently, only XSane supports languages other than English. If you are running XSane, make sure your locale is set correctly. For details on setting your locale, see the documentation that came with your operating system.

XSane displays garbage characters in the scan options. Run XSane version .90 or higher, which supports more languages than its earlier versions.

Troubleshooting 19 If you are running Linpus, it is necessary to upgrade XSane so that it will work correctly with non-English languages.

Troubleshooting 20 Index

A U adjusting scan settings using the network scan driver 6 using OpenOffice.org 11 using scanimage 13 using the command line 13 using XSane 11

C cancelling a scan 16 checking if the scan driver is installed 15

I importing scanned pages 11 installing on Linspire Linux 6 installing on Ubuntu Linux 6

N network scan driver installation requirements 5 installing on Debian GNU/Linux 6 installing on Linpus Linux 5 installing on Red Flag Linux 5 installing on RedHat Linux 5 installing on SUSE Linux 5 introduction 5 uninstalling 6

S scan settings OpenOffice.org Writer 11 XSane 11 scanning 7 both sides of the page 10 cancelling a scan 16 multiple pages 8 using GIMP 7 using OpenOffice.org 7 using the command line 8 using XSane 7 setting default values 15 supported operating systems 5

T troubleshooting 17

Index 21