QPDF is a command-line program that does structural, content-preserving transformations on PDF files.
Created attachment 295775 [details] qpdf-2.3.0.ebuild One of the easier ebuilds I've written so far ... it "just works", ldd on the binaries confirms dependencies, should be good to go.
Added to CVS.