Yet another PDF merger

Having tried all different kinds of combinations of PDF tools to simply merge files, I have been pretty disappointed. So I took the example from the great (but sparsely documented) PDF::API2 and wrote my own little version that has the following features:

  • Links between merged files will be converted into internal links.
  • The same is true for outlines that point to external files.
  • Trees of outlines are merged rather than just concatenated.
  • Further outlines to external files will be removed.

Links will be preserved also when using named destinations. However, other named object might become broken. For the files I encountered so far that was not a problem at all. Changing this as well should be straight-forward.