Skip to content

Conversation

@OverSamu
Copy link

Hi, following #743, in order not to change the current behavior, I propose to detect EOF (Ctrl+D, or Ctrl+Z then Enter on Windows) to interrupt multiple scans started with --waitscan by saving the pages scanned up to that point.

I tested the implementation on Windows 10 and it behaves as I expect.

naps2.console -o "scan.pdf" -n 100 --waitscan --firstnow -v
Beginning scan...
Starting scan 1 of 100...
Scanned page 1.
1 page(s) scanned.
Press Enter to scan, or Ctrl+D to stop and save.

Starting scan 2 of 100...
Scanned page 2.
1 page(s) scanned.
Press Enter to scan, or Ctrl+D to stop and save.
^Z
Stopping scan and saving...
Exporting...
Exporting page 1 of 2.
Exporting page 2 of 2.
Successfully saved PDF file to scan.pdf

* Initial plan

* Add Ctrl+D shortcut to stop multiple scans early

Co-authored-by: OverSamu <17676511+OverSamu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: OverSamu <17676511+OverSamu@users.noreply.github.com>
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.

2 participants