Skip to content

Implementing PaperSource.Auto - #857

Open
protoface wants to merge 5 commits into
cyanfish:masterfrom
protoface:pr
Open

Implementing PaperSource.Auto#857
protoface wants to merge 5 commits into
cyanfish:masterfrom
protoface:pr

Conversation

@protoface

Copy link
Copy Markdown

Summary

Implements a new PaperSource which auto-selects either the Feeder or Glass (Flatbed) PaperSource depending on whether there are pages in the feeder.
Currently only implemented for ESCL and WIA drivers.

Behavior

  • Checks if both (Glass and Feeder) are available as Sources, and the driver is either ESCL or WIA
    • only then is it visible as an option
  • On scan
    • (ESCL) Checks whether the adf is reported empty, falls back to flatbed if it is
    • (WIA) Tries to scan using the feeder, if it fails, falls back to Flatbed

Why

Simplifies the workflow and is more in line with defaults in manufacturer-supplied software. This feature was also heavily requested in my office.

Fixes #289

implements a new PaperSource which first tries to use the feeder and on fail (no pages) falls back to glass

Took 3 hours 35 minutes
@cyanfish

Copy link
Copy Markdown
Owner

The way I would want to do this is:

  • Implement this in drivers under PaperSource.Auto (which is intended to handle this case)
  • Show ScanSource.Auto in EditProfileForm based on capabilities (existing CanCheckIfFeederHasPaper/FeederCheck fields, maybe also with a hard-coded driver check if we're not implementing all of them at once)

also removes "FeederToGlass"-specific changes
@protoface

protoface commented Jul 27, 2026

Copy link
Copy Markdown
Author

Thanks for your feedback. I

  • Removed everything relating to PaperSource.FeederToGlass and reimplemented it under PaperSource.Auto
  • Also tried to implement it for the Twain driver but wasnt able to test it
  • Sidebar and EditProfileForm omit ScanSource.Auto for unsupported drivers and if cap conditions arent met

Feel free to request any changes

@protoface protoface changed the title Added "FeederToGlass" PaperSource Implementing PaperSource.Auto Jul 27, 2026
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

Successfully merging this pull request may close these issues.

"Auto" paper source

2 participants