manuc66 / node-hp-scan-to

Allow to send scan from device to computer for some HP All-in-One Printers - Scan to computer
https://manuc66.github.io/node-hp-scan-to/
MIT License
163 stars 25 forks source link

ADF Seperation #1020

Open SnowJuli opened 3 hours ago

SnowJuli commented 3 hours ago

Is your feature request related to a problem? Please describe. I noticed that when scanning with my Officejet 3830, that when I use the ADF Scanning feature and it uploads the scan to paperless as one document. Which is very unfortunate when I fill up multiple pdfs as content from some random folder I have in my shelves :D

Describe the solution you'd like An Environment Flag would be nice to automatically seperate the documents into multiple ones before uploading to paperless.

Describe alternatives you've considered Exchanging the documents one-by-one is very annoying but a workaround.

Additional context Is it even possible? Or is this an HP limitation?

manuc66 commented 3 hours ago

Hi @SnowJuli

I understand your issue. The current behavior of node-hp-scan-to is indeed intended to closely resemble the original hp. For use cases that differ from yours, it can be convenient to have the option to compile multiple pages of the same topic into a single document.

This is not a limitation of the hp devices, as the PDF is not generated by the device itself, but rather by node-hp-scan-to. In reallity I see that I took a design decision to always send pdf to paperless and to always group the scan item into one single pdf.

I think it could be fixed by adding some additional conditional logic here: https://github.com/manuc66/node-hp-scan-to/blob/d7ff26870c6446a323acaa55f193793068c6654e/src/scanProcessing.ts#L446-L463 .

It would then preserve the two possibilities:

Best regards.

SnowJuli commented 3 hours ago

Hello @manuc66 and thanks for your fast reply!

Good to know that its not a HP Limitation and that it could be possible. I would really like some possibility in the future but don't feel pressured just because one person requested it :D You are doing an amazing work but unfortunately I'm not really fluent in TypeScript so I would rely on other people who have more experience.

Anyways, thanks for your reply and I'll look forward to a change in the future.