rocketraman / sane-scan-pdf

Sane command-line scan-to-pdf script on Linux with OCR and deskew support
MIT License
140 stars 28 forks source link

multi page scanning #18

Closed joesphan closed 4 years ago

joesphan commented 4 years ago

Hello! Is it possible to do multi page scanning? I tried the -e command but it doesn't seem to do much (albeit i'm not sure what it does)

rocketraman commented 4 years ago

Yes multi page scanning would be the normal operation, no switch is required. -e truncated pages, use --help to get an explanation of each switch.

joesphan commented 4 years ago

so I have ./scan --device pixma:04A926EF_SJ3029112970S -e 5 -o asdf.pdf and the output is

Scanning...
Scanned document /tmp/tmp.oORFqyYX7f/scan-0001
scanadf: sane_read: Device busy
Device busy
Scanned 1 pages
Processing 1 pages

Done.

can you clue me into what i'm doing wrong?

joesphan commented 4 years ago

Ok, I might not have been as clear, I want to scan a multi page document into a single pdf

joesphan commented 4 years ago

This seemed to be the solution: adding a -a at the end of it appends to it. Thanks!

 ./scan --device pixma:04A926EF_SJ3029112970S -o asdf1.pdf -a
Scanning...
Scanned document /tmp/tmp.DMJUj0buEG/scan-0001
scanadf: sane_read: Device busy
Device busy
Scanned 1 pages
Processing 1 pages
Concatenating pdfs...

Done.
rocketraman commented 4 years ago

Yes, just to clarify, the -a option allows a scan to append to an existing PDF, and has nothing to do with multi-page scans in and of themselves. Multi-page scans happen automatically with scanners that support a sheet feeder, and no -a option is necessary in this case.