There seem to be a growing plethora of Perl modules for creating
and manipulating PDF files. 
