-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for removing of blank pages #39
Conversation
revert to old kill method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to provide a default value for threshold in the readme? Not apparently obvious, at least to me...
Done ✅ |
@pedropombeiro: I just noticed the blank pages are only removed after scanning front and rear pages. While much less likely, there could also be an empty page in a stack of single-sided papers. Do you think it is worth adding it there as well? I don't have a clear opinion on this... |
I thought about this, and the conclusion I arrived at was that if there is a blank front page, probably the intention of the author is that the page remains, as opposed to when they occur on the backside, which is normally dictated by a technical reason (documents printed in simplex as opposed to duplex, etc.) This can be easily added in the future, if we see that there are real-world scenarios that required though. |
@PhilippMundhenk by the way, should this project have a space for discussions? There have been situations where I wanted to propose something (like the rewrite), but the only option is to open a PR or an issue. |
@PhilippMundhenk Thanks for asking. I consider that entire body of work to be under the MIT License, so I have no issues at all if you want to incorporate parts of it into your own project. It's worth noting that this version of the blank page removal script was heavily based on an answer in a StackOverflow discussion, so I can't exactly take full credit for it. |
Thanks for kindly allowing to use your work @calvinrw. May I take this opportunity and ask a quick unrelated question? Are you able to scan in B/W and Color, depending on which button you press? One thing I noticed, maybe because this project uses |
Still catching up with all the additional contributions and the sudden attention. In the last 3-4 weeks, more things have happened here than in the last ten years (or however old this project is) combined... ;) |
@pedropombeiro The MFC-L2750DW doesn't present a choice for color versus BW scanning in its UI. You are right: the way I set it up, options like page size, duplex scanning, DPI, etc. are all "hard-coded" arguments to My older MFC-9020CN has separate "Black" and "Color" Start buttons, but which one gets selected when starting a scan doesn't matter for the same reason. |
Thanks for the context @calvinrw. That matches what I'm seeing with my MFC-J4335DW, unfortunately. Not a big deal, since this scanner scans pretty quickly. It would be more of an issue with my previous Canon, which took a much longer time for color scans. |
This PR integrates the part of the logic in https://calvinrw.com/brscan4-paperless-workflow that drops blank pages from duplex scans. In order to maintain backward compatibility, this logic is only active if the
REMOVE_BLANK_THRESHOLD
environment variable is defined. It installs 3 new packages:bc
,pdftk
, andpoppler-utils
.