You might be better off asking these questions direct to the Metasploit Devs.
From what I can tell after looking at this for about two minutes, PDF_Parse is used to Parse an existing PDF file, not to create a new one. The code you reproduced above is probably a good way to create a new PDF (since HDM was involved in writing that sploit Im assuming that this is the correct way to go about it ).


).
