HP L7580 Support for Duplex Scanning

Asked by seagull

This may be the wrong support group, if so I apologise.

I am trying to use the duplex ADF on this device, but anything but the hpoj driver refuses to recognise it.

What I am trying to do is a console-based scan to pdf to get rid of paper clutter. I tried gscand2pdf, but it's too interactive and doesn't recognise the ADF is duplex-capable, either.

HPLIP calls xscanimage to do a scan. It appears AFAIK to use hpaio. So assuming that scanimage should work I have built a BASH script around this.

Result of scanimage -L
device `hpoj:hpjd:192.168.61.2' is a HP Officejet Pro L7500 multi-function peripheral
device `hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2' is a Hewlett-Packard Officejet_Pro_L7500 all-in-one

Result of scanimage -d hpoj:hpjd:192.168.61.2 --help
Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write PNM 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 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), and %i (index number)
-b, --batch[=FORMAT] working in batch mode, FORMAT is `out%d.pnm' or
                           `out%d.tif' 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 number in filename by an amount of #
    --batch-double increment page number by two for 2sided originals
                           being scanned in a single sided scanner
    --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
-h, --help display this help message and exit
-v, --verbose give even more status messages
-B, --buffer-size change default input buffersize
-V, --version print version information

Options specific to device `hpoj:hpjd:192.168.61.2':
  Scan mode:
    --mode Lineart|Grayscale|Color [Color]
        Selects the scan mode (e.g., lineart,monochrome, or color).
    --resolution 75..2400dpi [75]
        Sets the resolution of the scanned image.
  Advanced:
    --contrast 0..100 [inactive]
        Controls the contrast of the acquired image.
    --compression None|JPEG [None]
        Selects the scanner compression method for faster scans, possibly at
        the expense of image quality.
    --jpeg-compression-factor 0..100 [inactive]
        Sets the scanner JPEG compression factor. Larger numbers mean better
        compression, and smaller numbers mean better image quality.
    --batch-scan[=(yes|no)] [no]
        Guarantees that a "no documents" condition will be returned after the
        last scanned page, to prevent endless flatbed scans after a batch scan.
         For some models, option changes in the middle of a batch scan don't
        take effect until after the last page.
    --source Auto|Flatbed|ADF [Auto]
        Selects the desired scan source for models with both flatbed and
        automatic document feeder (ADF) capabilities. The "Auto" setting means
        that the ADF will be used if it's loaded, and the flatbed (if present)
        will be used otherwise.
    --duplex[=(yes|no)] [no]
        Enables scanning on both sides of the page for models with
        duplex-capable document feeders. For pages printed in "book"-style
        duplex mode, one side will be scanned upside-down. This feature is
        experimental.
  Geometry:
    --length-measurement Unknown|Approximate|Padded [Padded]
        Selects how the scanned image length is measured and reported, which
        is impossible to know in advance for scrollfed scans.
    -l 0..215.9mm [0]
        Top-left x position of scan area.
    -t 0..381mm [0]
        Top-left y position of scan area.
    -x 0..215.9mm [215.9]
        Width of scan-area.
    -y 0..381mm [381]
        Height of scan-area.

Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
    hpoj:hpjd:192.168.61.2 hpaio:/net/Photosmart_C6100_series?ip=192.168.1.23
    hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2

With hpoj I can perform a duplex scan sometimes, but sometimes it just loops feeding the same sheet in and out of the ADF so that instead of getting two scans per page it keeps going until I kill it.

I want to use the hplip driver as much as possible.

Here is my script if anyone is interested:

--------------X---------------------
#!/bin/bash

#(Mostly) non-interactive scan to pdf
#Requires sane, imagemagick, and pdftk
function process_scan
{
  # parallel OCR and conversion to postscript (dual core)
  gocr $1.pnm > $1.txt & I=$!
  convert -page a4 $1.pnm $1.ps & J=$!
  wait $I $J $K
  # parallel pdf creation from image and ocr text
  ps2pdf -sPAPERSIZE=a4 $1.ps $1.pdf & I=$!
  a2ps -M A4 $1.txt -o text$1.ps
  ps2pdf -sPAPERSIZE=a4 text$1.ps text$1.pdf & J=$!
  wait $I $J
}

D=scand$$
mkdir $D
cd $D
M=`date "+%Y-%m (%b)"`
dest="/shared/john/documents/scans/$M"

SIDES=""
DUPLEX=""
while test "$SIDES" != "D" -a "$SIDES" != "S"
do
  echo -n "Duplex (D) or Single-sided (S)? [D] "
  read SIDES
  echo $SIDES
  if test -z "$SIDES" -o "$SIDES" = "D"
  then
    SIDES=D
    DUPLEX="--duplex=yes"
  fi
done

#Scan in the pages
#Creates outn.pnm for each page
scanimage --device-name='hpoj:hpjd:192.168.61.2' -B --mode='Grayscale' --source='ADF'\
     -x 210 --compression='None' -y 297 -l 0 --resolution='400' -t 0 --batch-scan='yes'\
     --batch --progress $DUPLEX > image.tif

i=1; while test -f out$i.pnm
do
  # if duplex scan, even numbered scans are upside down - put them right otherwise OCR fails
  if test "$SIDES" = "D" -a $[i%2] -eq 0
  then
    mv out$i.pnm out${i}a.pnm
    convert -rotate 180 out${i}a.pnm out$i.pnm
    rm out${i}a.pnm
  fi
  process_scan out$i
  ((i++))
done
pdftk out*.pdf text*.pdf cat output scan.pdf
if test ! -f scan.pdf
then
  exit 1
fi

mkdir -p "$dest"
i=1; j=000$i
while test -f "$dest/scan${j: -4}.pdf"
do
  ((i++))
  j=000$i
done
cp scan.pdf "$dest/scan${j: -4}.pdf"

cd ..
echo "removing temporary directory $D"
rm -r $D

exit 0

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

HPOJ is very old and is unsupported.

HPOJ and HPLIP will not work together.

If you remove HPOJ and if HPLIP 2.8.2 is installed you shouldn't have any problems. If you do have continued problems run hp-check -t and post the output.

Hope this helps.

Aaron

Revision history for this message
Mark Myatt (mark-myatt) said :
#2

Hi Seagull - I too have (just) acquired a HP Officejet Pro L7580 but cannot even get it started. I run Gnome on Debian Etch and so far the MFD is not recognised. I use it attached to a router and works well with a MS Dell Laptop. The correct port is registering. I have tried HPLIP 1.7.2 to no avail. (Recommended by Sourceforge). 2.8.2 does not work either. Any Ideas?

Mark

Revision history for this message
seagull (john-millington) said :
#3

I have now done as suggested:

Removed hpoj:

sudo apt-get remove --purge hpoj

Installed HPLIP 2.8.2 from hplip-2.8.2.run

Output of hp-check -t

HP Linux Imaging and Printing System (ver. 2.8.2)
Dependency/Version Check Utility ver. 13.0

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux gemini 2.6.22-14-generic #1 SMP Tue Feb 12 02:46:46 UTC 2008 x86_64 GNU/Linux

Distribution:
ubuntu 7.10

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.1 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
OK, Version 4.7 installed

Checking for CUPS...
Status: scheduler is running
Version: 1.3.6

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
OK, found.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-devel - Python development files...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.2 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hpssd]
# Note: hpssd does not support dynamic ports
# Port 2207 is the IANA assigned port for hpssd
port=2207

[hplip]
version=2.8.2

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hpijs/HP
ppdbase=/usr/share/ppd/hpijs
doc=/usr/share/doc/hplip-2.8.2
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp/

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=yes
internal-tag=2.8.2.10

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

HP99413D
--------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/net/Photosmart_C6100_series?ip=192.168.1.23
PPD: /etc/cups/ppd/HP99413D.ppd
PPD Description: HP PhotoSmart C6100 Foomatic/hpijs (recommended)
Printer status: printer HP99413D is idle. enabled since Tue 25 Mar 2008 18:44:03 EST
Communication status: Good

Officejet_Pro_L7580a
--------------------
Type: Printer
Installed in HPLIP?: Yes, using the hp: CUPS backend.
Device URI: hp:/net/Officejet_Pro_L7500?ip=192.168.61.2
PPD: /etc/cups/ppd/Officejet_Pro_L7580a.ppd
PPD Description: HP OfficeJet Pro L7500 Foomatic/hpijs, hpijs 2.8.2
Printer status: printer Officejet_Pro_L7580a is idle. enabled since Tue 25 Mar 2008 18:45:39 EST
Communication status: Good

PDF
---
Type: Unknown
Installed in HPLIP?: No, not using the hp: or hpfax: CUPS backend.
Device URI: cups-pdf:/
PPD: /etc/cups/ppd/PDF.ppd
PPD Description: Generic PDF file generator
Printer status: printer PDF is idle. enabled since Sat 08 Sep 2007 20:19:23 EST

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
device `hpaio:/net/Photosmart_C6100_series?ip=192.168.1.23' is a Hewlett-Packard Photosmart_C6100_series all-in-one
device `hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2' is a Hewlett-Packard Officejet_Pro_L7500 all-in-one

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

-----------
| SUMMARY |
-----------

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

**** and output from scanimage -L

device `hpaio:/net/Photosmart_C6100_series?ip=192.168.1.23' is a Hewlett-Packard Photosmart_C6100_series all-in-one
device `hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2' is a Hewlett-Packard Officejet_Pro_L7500 all-in-one

**** output from scanimage -d 'hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2' --help

Usage: scanimage [OPTION]...

Start image acquisition on a scanner device and write PNM 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 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), and %i (index number)
-b, --batch[=FORMAT] working in batch mode, FORMAT is `out%d.pnm' or
                           `out%d.tif' 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 number in filename by an amount of #
    --batch-double increment page number by two for 2sided originals
                           being scanned in a single sided scanner
    --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
-h, --help display this help message and exit
-v, --verbose give even more status messages
-B, --buffer-size change default input buffersize
-V, --version print version information

Options specific to device `hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2':
  Scan mode:
    --mode Lineart|Gray|Color [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 75..2400dpi [75]
        Sets the resolution of the scanned image.
  Advanced:
    --contrast 0..100 [inactive]
        Controls the contrast of the acquired image.
    --compression None|JPEG [JPEG]
        Selects the scanner compression method for faster scans, possibly at
        the expense of image quality.
    --jpeg-quality 0..100 [10]
        Sets the scanner JPEG compression factor. Larger numbers mean better
        compression, and smaller numbers mean better image quality.
    --batch-scan[=(yes|no)] [no]
        Enables continuous scanning with automatic document feeder (ADF).
    --source Auto|Flatbed|ADF [Auto]
        Selects the scan source (such as a document-feeder).
  Geometry:
    --length-measurement Unknown|Approximate|Padded [Padded]
        Selects how the scanned image length is measured and reported, which
        is impossible to know in advance for scrollfed scans.
    -l 0..215.9mm [0]
        Top-left x position of scan area.
    -t 0..381mm [0]
        Top-left y position of scan area.
    -x 0..215.9mm [215.9]
        Width of scan-area.
    -y 0..381mm [381]
        Height of scan-area.

Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

List of available devices:
    hpaio:/net/Photosmart_C6100_series?ip=192.168.1.23
    hpaio:/net/Officejet_Pro_L7500?ip=192.168.61.2
****

There is still no duplex option.

Aaron, sorry I don't have an answer for you. The L7580 I have is connected through a network switch rather than a router, but I do seem to recall seeing a problem going through routers mentioned somewhere.

I am really hopeful we can get this will work as it is the one remaining obstacle for me going full steam on my document scanning.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#4

I've tested the HP OfficeJet Pro L7580 with Ubuntu and HPLIP 2.8.2 and it's working correctly. I also tested the duplex and it's working correctly as well. I configure duplex through hp-toolbox > Printer Settings.

I also tested the ADF scanning and that worked correctly as well.

I used xsane because I couldn't find the scanimage ADF option either.

And just to be clear, the ADF is the scanning feature on the top of the unit, duplex is the addon in the back (assuming you have it) that allows printing on both sides of 1 sheet of paper. The ADF and duplex features aren't mutually inclusive, and aren't used together per se.

Perhaps I'm confused by what you are trying to do.. you are trying to scan using scanimage and using the ADF. Can you try using xsane?

Aaron

Revision history for this message
seagull (john-millington) said :
#5

Aaron, thanks for testing this. To confirm what I am trying to do:

I want to scan both sides of A4 documents from the ADF on the top of the machine. This works if I use the HP Solution Center Windows software on another machine, but unfortunately this is a flight of stairs away and is too interactive for my purposes.

I can successfully print in duplex - but this is not my issue.

The HP-toolbox program only shows options for printing in duplex, but not scanning.

Now for xsane.

I can't find an option for duplex scanning under xsane. I can select ADF, Flatbed or Auto. When I select ADF, it just feeds the pages through, scanning only the front side of each page.

Let me know if you need me to provide any more information.

Thanks

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#6

Okay I understand clearly now.

HPLIP doesn't, at this time, support duplex ADF scanning. However it is on our list of features to add, although I can't give any ETA on when/if this is going to happen.

Sorry for the inconvenience!

Aaron

Revision history for this message
seagull (john-millington) said :
#7

OK, thanks. I'll go back to trying hpoj until hplip has the feature.

Regards

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#8

Setting to answered.

Thanks.

A

Revision history for this message
MartinDengler (mtd) said :
#9

Hi,

What work would be required to support duplex ADF scanning? It's been on the list since 2008 :( Is it a UI issue (since the printer & hpoj software could clearly do it)?

Can you help with this problem?

Provide an answer of your own, or ask seagull for more information if necessary.

To post a message you must log in.