Skip to content
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

Make options --paper, --*paper and --papersize override preceding ones #79

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/pdfjam
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ if command -v paper >/dev/null ; then
paper='' ## We might not have a LaTeX-compatible name
else
paper='a4paper' ## fallback paper size is ISO A4
papersize='' ## clear papersize
fi
##
## END OF SETTINGS MADE DIRECTLY WITHIN THE SCRIPT
Expand Down Expand Up @@ -460,6 +461,7 @@ while test -n "${1}${2}"; do
shift ;;
--paper)
paper="${2}"
papersize='' ## clear papersize
callOptions="$callOptions ${1} ${2}" ;
shift ;;
--pagecolor)
Expand All @@ -477,9 +479,11 @@ while test -n "${1}${2}"; do
--ansidpaper | --ansiepaper | \
--letterpaper | --legalpaper | --executivepaper)
paper=$(printf "%s" "${1}" | sed 's/^--//') ;
papersize='' ## clear papersize
callOptions="$callOptions ${1}" ;
;;
--papersize)
paper='' ## clear paper
papersize="papersize=${2}" ;
callOptions="$callOptions ${1} '${2}'" ;
shift ;;
Expand Down
Loading