I'm not anywhere where I can get to the code. But the overall picture is simple.
Print to a Adobe postscript printer (download it), it creates a PS file. Pass the PS file to ghostscript to create the PDF. We use it to create thousands of emails attachments monthly. Because the AdobeGeneric PS printer looks like a normal printer it will accept anything - including DOC's.
John
John Fabiani
Woodland, CA