Outline/table of contents modification
As suggested, a diff of some code I wrote to insert an Outline into a PDF w/ or without an existing Outline. Only wholesale replacement of table of contents is supported although it seems like more granular access would be beneficial to graphical programs.
Changes to Outline.h/cc, and Catalog.h/cc
A small program to demonstrate the functionality. pdftoc.cc