Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
blake5634 opened this issue Oct 23, 2021 · 2 comments
Open

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

blake5634 opened this issue Oct 23, 2021 · 2 comments

Comments

@blake5634
Copy link

blake5634 commented Oct 23, 2021

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()
@manisandro
Copy link
Member

Generally with these types of issues, it's hard to debug them without having an affected device. You'll need to do some in-depth debugging on your side to narrow down the issue and ideally file a PR with a fix.

@blake5634
Copy link
Author

Well, my interim solution is to only load the pages I wish to scan. "ADF out of documents" detection works fine. Sorry, I use sane for work and don't have time to debug further than the minimal code example above. But it would be able to load for example a stack of 10 2-page documents. I do appreciate your work on sane!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants