python-pillow / python-pillow/Sane
HP All-in-one: ADF feeds two sheets when one is canned
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 61
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
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()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report provides a Python reproduction using sane.open(), dev.start(), dev.snap(), and source='ADF' on an HP OfficeJet Pro 9020. Begin by reproducing the extra-feed behavior and trace how snap and iterator handling interact with SANE ADF scanning. Done means establishing a tested correction for the one-page case or confirming and documenting an upstream hardware/backend limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100