Creating Proceedings from a
Bunch of PDFs
This little set of scripts was inspired by
Kristof van Laerhoven's instructions.
When compiling proceedings, one usually is given a set of PDFs, and the
problem is to assemble them into one single PDF with consecutive page numbers
and, possibly, a uniform header.
The following method / shell script does all that. It should run on any Unix
as-is. (I tested it on Mac OS X, but it should run on any other Unix/Linux
without modifications.)
Prerequisites
You need the following tools:
- A command line ;-)
- A working teTeX
installation (other LaTeX distributions should work, too.)
- pdfjoin as part of the
PDFjam package
(there are binary distros for several linuxes)
- pdftk
- pdffonts, which comes with
xpdf
(xpdf is available as a binary package on all Linuxes, and on Mac, you can
install it painlessly via Fink)
All of these tools are free. The last one (pdffonts) is optional.
Then, you need the following files / scripts:
make_proceedings.sh,
check_font_embedding.sh,
pagenumbers.tex.
Quick Instructions
In a nutshell, here is what you have to do:
- Put the files make_proceedings.sh check_font_embedding.sh
pagenumbers.tex in one directory, and make the scripts
executable (chmod u+x *.sh).
- Put all the PDFs of the individual papers in the same directory.
- Run ./check_font_embedding.sh; this will output any PDFs that
do not have all their fonts embedded (complete embedding of all
fonts is a requirement by most print shops, and it greatly facilitates
hasslefree viewing in other countries); this step is optional, of
course.
- Edit pagenumbers.tex; even if you don't speak LaTeX, this should
be fairly obvious; all you need to do is to copy the LaTeX source
often enough, which produces the empty pages with page numbers,
and to edit the line that start with
\newcommand{\headertext}.
- Run make_proceedings.sh; this will take a few seconds or
minutes, depending on the amount of PDFs.
- At the end, you should have a file final_proceedings.pdf in the
same directory.
Explanations
For those of you who like to understand what's going on,
the script make_proceedings.sh performs the following steps:
- clean up any leftovers from a previous run
- join all PDFs into one PDF, and at the same time make sure that
everything fits onto A4 paper
- create a PDF with lots of empty pages that have just the page numbers and
the header
- split that into many PDFs, one for each page
- split the PDF that contains all the papers into individual pages;
now we've got one page PDFs of all the papers and all the page
numbers, all in the right order
- merge the individual pages of the papers with the corresponding
page numbers
- join those merged PDFs to make the final proceedings.
- Viola!
Gabriel Zachmann
Last modified:
Mon Oct 02 14:20:27 MDT 2017