mirror of
https://github.com/rocketraman/sane-scan-pdf.git
synced 2025-05-19 09:00:42 -07:00
Allow disable default page size
This commit is contained in:
parent
ed98da9c43
commit
b59999717e
9
scan
9
scan
@ -19,6 +19,7 @@ MAXPAGE=
|
|||||||
TRUNCPAGE=0
|
TRUNCPAGE=0
|
||||||
HELP=0
|
HELP=0
|
||||||
SIZE=
|
SIZE=
|
||||||
|
DEFAULTSIZE=1
|
||||||
PGHEIGHT=
|
PGHEIGHT=
|
||||||
PGHEIGHTIN=
|
PGHEIGHTIN=
|
||||||
PGWIDTH=
|
PGWIDTH=
|
||||||
@ -62,6 +63,8 @@ while [[ $# > 0 ]]; do
|
|||||||
|
|
||||||
-pw|--page-width) shift; PGWIDTH=$1 ;;
|
-pw|--page-width) shift; PGWIDTH=$1 ;;
|
||||||
|
|
||||||
|
--no-default-size) DEFAULTSIZE=0 ;;
|
||||||
|
|
||||||
--crop) CROP=1 ;;
|
--crop) CROP=1 ;;
|
||||||
|
|
||||||
--deskew) DESKEW=1 ;;
|
--deskew) DESKEW=1 ;;
|
||||||
@ -117,6 +120,8 @@ if [[ $HELP == 1 ]]; then
|
|||||||
echo " -xo, --driver-options"
|
echo " -xo, --driver-options"
|
||||||
echo " Send additional options to the scanner driver e.g."
|
echo " Send additional options to the scanner driver e.g."
|
||||||
echo " -xo \"--whatever bar --frobnitz baz\""
|
echo " -xo \"--whatever bar --frobnitz baz\""
|
||||||
|
echo " --no-default-size"
|
||||||
|
echo " Disable default page size, useful if driver does not support page size/location arguments"
|
||||||
echo " --crop"
|
echo " --crop"
|
||||||
echo " Crop to contents (driver must support this)"
|
echo " Crop to contents (driver must support this)"
|
||||||
echo " --deskew"
|
echo " --deskew"
|
||||||
@ -182,8 +187,8 @@ fi
|
|||||||
|
|
||||||
PS2PDF_OPTS=
|
PS2PDF_OPTS=
|
||||||
|
|
||||||
if [[ $CROP != 1 && $SIZE == "" ]]; then
|
if [[ $CROP != 1 && $SIZE == "" && $DEFAULTSIZE == 1 ]]; then
|
||||||
# Default to Letter size, but only if crop is not specified
|
# Default to Letter size, but only if crop is not specified and this feature is not disabled
|
||||||
SIZE=Letter
|
SIZE=Letter
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user