mirror of
https://github.com/rocketraman/sane-scan-pdf.git
synced 2025-05-16 07:30:21 -07:00
warn on deskew but no crop
Best practices from the sane mailing list indicate that deskew should be used in combination with crop for best results. Warn if not doing so.
This commit is contained in:
parent
31ef706c47
commit
eea2c495d9
11
scan
11
scan
@ -258,6 +258,13 @@ case "$SIZE" in
|
||||
|
||||
esac
|
||||
|
||||
if [[ $DESKEW == 1 ]]; then
|
||||
if [[ $CROP != 1 ]]; then
|
||||
echo >&2 'Warning: `--deskew` specified, but `--crop` not specified. It is recommended to scan at max height/width and then crop to give deskew the best chance of working correctly.'
|
||||
fi
|
||||
DESKEW="--swdeskew=yes"
|
||||
fi
|
||||
|
||||
if [[ $CROP != 1 && "$PGHEIGHT" != "" ]]; then
|
||||
PGHEIGHTIN=$(units --compact -1 "$PGHEIGHT mm" 'in')
|
||||
PGHEIGHT="--page-height $PGHEIGHT -y $PGHEIGHT"
|
||||
@ -279,10 +286,6 @@ if [[ $CROP == 1 ]]; then
|
||||
PS2PDF_OPTS="-dEPSCrop"
|
||||
fi
|
||||
|
||||
if [[ $DESKEW == 1 ]]; then
|
||||
DESKEW="--swdeskew=yes"
|
||||
fi
|
||||
|
||||
if [[ $SKIP_EMPTY_PAGES == 1 && ! -x "$(command -v bc)" ]]; then
|
||||
echo >&2 'Warning: `--skip-empty-pages` specified, but `bc` not available. Disabling empty page detection.'
|
||||
SKIP_EMPTY_PAGES=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user