What is PDFedit?
Free (and open source) editor for manipulating PDF documents. GUI version + commandline interface. Scripting is used to a great extent in editor and almost anything can be scripted, it is possible to create own scripts or plugins.
The project is no longer developed. Last version, 20140526_1531, released in May 2014, can be still downloaded from SourceForge.