Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Radek Hušek
cups-pdf-postprocess
Commits
de5d774b
Commit
de5d774b
authored
Oct 13, 2021
by
Radek Hušek
Browse files
add pdfbook
parent
f260a0e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
pdfbook
0 → 100755
View file @
de5d774b
#!/bin/sh
##
## pdfbook: Rearrange pages of one or more PDF files into 2-up signatures
##
## Author David Firth (http://go.warwick.ac.uk/dfirth), with help
## from Marco Pessotto
##
## This is a simple wrapper for pdfjam, version N.NN
##
case
$1
in
--short-edge
)
shortedge
=
true
;
shift
;
;;
*
)
;;
esac
for
arg
do
case
$arg
in
--signature
*
)
## catches both --signature and --signature*
signature
=
true
;
break
;;
*
)
;;
esac
done
##
## If $signature is empty, we need to use a default:
##
if
test
-z
"
$signature
"
;
then
signature
=
"--signature 4"
else
signature
=
""
fi
##
## Make the call to pdfjam:
##
if
test
-z
"
$shortedge
"
then
exec
pdfjam
--landscape
--suffix
book
$signature
"
$@
"
else
(
kpsewhich everyshi.sty
>
/dev/null
)
||
{
echo
"the 'everyshi' package is not installed."
;
exit
1
}
exec
pdfjam
--landscape
--suffix
book
$signature
\
--preamble
'\usepackage{everyshi}
\makeatletter
\EveryShipout{\ifodd\c@page\pdfpageattr{/Rotate 180}\fi}
\makeatother
'
"
$@
"
fi
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment