Scan from cli to pdf, using scanimage, how do i get better results?

Currently, I am writing a script (Peter Gerhards / paperless-scan-script · GitLab) with sane’s scanimage command to scan multiple sites to PDFs and send them to my paperless instance.

Before I was using Simple-Scan, scans are perfectly cropped and have a good quality. But: It’s fucking annoying to click the save as dialog and the scan button every time I insert a new page. So: my question: Is it possible to use simple-scan via CLI to do the scanning and auto cropping? I guess not, at least I found no option for this in simple-scan.
But do you know an alternative program which does the same job as Simple-Scan/the correct parameter that I can achieve the same with scan image/convert?

Currently, I am using scanimage "--device-name=brother5:bus6;dev3" --resolution=200 -l 0 -t 0 --format=tiff --progress | convert tiff:- -trim +repage $destination.jpg, but its quality and cropping is not perfect. What is Simple-Scan using beneath?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.