0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.227.183.161


Current Path : /proc/self/root/usr/bin/
Upload File :
Current File : //proc/self/root/usr/bin/pdfbook

#!/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 2.08 
##
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 --booklet true --landscape --suffix book $signature "$@"
else
    (kpsewhich everyshi.sty >/dev/null) || {
	echo "the 'everyshi' package is not installed."; exit 1
    }
    exec pdfjam --booklet true --landscape --suffix book $signature \
	--preamble '\usepackage{everyshi}
\makeatletter
\EveryShipout{\ifodd\c@page\pdfpageattr{/Rotate 180}\fi}
\makeatother
' "$@"
fi