Skip to content

HP All-in-one: ADF feeds two sheets when one is canned #73

Open
@blake5634

Description

@blake5634

If I e.g. use the iterator to scan 3 pages, a 4th one is also fed. Below is a minimal example which scans one page but feeds two sheets.

#!/usr/bin/env python
import sane
import numpy
from PIL import Image
#
# Initialize sane
#
ver = sane.init()
print('SANE version:', ver)
# prints: SANE version: (16777245, 1, 0, 29)
#
# Get devices
#
#devices = sane.get_devices()
#print('Available devices:', devices)      
sc_dev = ('hpaio:/net/hp_officejet_pro_9020_series?ip=192.168.0.57&queue=false', 'Hewlett-Packard', 'hp_officejet_pro_9020_series', 'all-in-one')

print('\n Opening: \n', sc_dev[1], sc_dev[2])
#
# Open first device
#
dev = sane.open(sc_dev[0])
  
try:
  dev.depth = 8
  dev.mode = 'Color'
  dev.source = 'ADF'
  dev.resolution = 200
except:
  print('problem setting params')
  quit()
#
# Start a scan and get a PIL.Image object
#
dev.start()
im = dev.snap()
im.save('test_pil.png') 
#
# Close the device
#
dev.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions