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: 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:
  1. Put the files make_proceedings.sh check_font_embedding.sh pagenumbers.tex in one directory, and make the scripts executable (chmod u+x *.sh).
  2. Put all the PDFs of the individual papers in the same directory.
  3. 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.
  4. 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}.
  5. Run make_proceedings.sh; this will take a few seconds or minutes, depending on the amount of PDFs.
  6. 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:
  1. clean up any leftovers from a previous run
  2. join all PDFs into one PDF, and at the same time make sure that everything fits onto A4 paper
  3. create a PDF with lots of empty pages that have just the page numbers and the header
  4. split that into many PDFs, one for each page
  5. 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
  6. merge the individual pages of the papers with the corresponding page numbers
  7. join those merged PDFs to make the final proceedings.
  8. Viola!
Gabriel Zachmann
Last modified: Mon Oct 02 14:20:27 MDT 2017