-
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
Cropping limited to letter size? #8
Comments
Hi @blankman373 . The A few things to check:
|
hi @rocketraman, thanks for getting back so quickly. I had some time to test tonight. It looks like it is a driver issue.
I can't believe I didn't test this earlier, but I also tested with a page of actual Legal size, and with the Thanks for your help. I'll try to reach out to the SANE project listserv. |
@blankman373 If you do end up creating an issue for the SANE project, please link it here for future searchers! |
@blankman373 Since the cropping is done in the driver, it probably depends on the scanner to have scanned enough data in the first place. Since the driver is defaulting to scanning a letter size page, that's all the image data the driver gets from the scanner, and so there is nothing to crop. Using the code from https://github.com/rocketraman/sane-scan-pdf/tree/issue-8, try specifying both a page height and crop i.e. I'm going to re-open this for now, as some changes in the script might be useful here. |
Thank you again for looking at this. it looks like it's working now. so i deleted the old code and cloned this branch using updated my script to And now it properly crops the legal length sized page. I then added the The last thing I tested, was a regular letter sized page. I thought that since Now I just need to figure out the python script to file these away into folders after OCR.. :) |
@blankman373 I just noticed the Fujitsu driver has an option for paper lower edge detection. Can you pull the updated issue-8 branch code, with the command line: /home/pi/sane-scan-pdf/scan -d -r 300 -v -m Gray --crop --deskew -o /home/pi/scans/scan-$now.pdf (i.e. without the |
hey @rocketraman, sorry it took so long to test this. i pulled the latest code from this branch (after making a backup of the old code) and tested without Unfortunately, it cropped the legal sized page at letter dimensions. I then put |
@blankman373 I believe I fixed the issue. Now, you should be able to specify [1] I say approximately because the cropping logic doesn't try to match a "stanard" size, it just crops to the content. This often results in page outputs with custom sizes, a bit smaller or larger than the standard size. This is to be expected. |
Closing, feel free to re-open if you still have problems. |
I'm working on setting up a basic document scanning station for my monthly bills. some of the bills are odd sizes, but they closely resemble legal size. its maybe 7x14, instead of 8.5x14. When I include the crop option, it crops the side, but also cuts off the bottom 3 inches. If i set the pagesize to legal, then it works, but that would do it for every scan then. Here's my code that i'm using with a Fujitsu SnapScan S510.
now=date +"%Y-%m-%d-%H%M"
#/home/pi/sane-scan-pdf/scan -d -r 300 -v -m Gray --crop --deskew --ocr -o /home/pi/scans/scan-$now.pdf
The text was updated successfully, but these errors were encountered: