#!/bin/bash
##  pdfbooklet: Rearrange pages of one or more PDF files into a booklet
##  This is a simple wrapper for pdfjam
##  Files are supposed to be in portrait form
##  print them double side by the long-edge (default)
##
PrOgRaM="${0##*/}"
function Error_Avortant(){ echo -e "\nERROR a ${PrOgRaM}: ${1}.\nAvortant...\n" ;  exit $2 ; }
#
[ -z "$1" -o "${1:0:1}" = "-" ] && echo -e "\nUs: ${PrOgRaM} [opcions pdfjam] <nom_de_fitxer>\n" && exit 1
#
PdFjAmCoMaNdA="pdfjam --quiet --vanilla --checkfiles --booklet true --angle 270 --suffix booklet"
exec $PdFjAmCoMaNdA "$@"
#



