Skip to content

Instantly share code, notes, and snippets.

@sithel
Last active February 13, 2019 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sithel/fcabd3a4553c514bbed84bdc8a3e1fd5 to your computer and use it in GitHub Desktop.
Save sithel/fcabd3a4553c514bbed84bdc8a3e1fd5 to your computer and use it in GitHub Desktop.
The "glue" bandaid for the tiny book signatures that sticks all the pages together in a single file
echo "How many signatures?"
read SIGS
echo "How many pages per signature?"
read PCOUNT
LINE="pdfjam "
for sig in `seq 1 $SIGS`;
do
echo "Signature : $sig of $SIGS"
i=$(($(($sig - 1)) * $PCOUNT))
sig_file_name="output_small/temp_sig_$i.pdf"
LINE="$LINE $sig_file_name"
done
LINE="$LINE --outfile output_small/book.pdf"
echo $LINE
eval $LINE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment