Maybe you could use OpenOffice and it's internal macro language to do the convertion job.
Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
Uh, rather than write code, how about you tell openoffice to write the document to the PDF printer, like:
/usr/local/OOffice1.1.5/soffice -pt "PDF" somefile.doc
The "-pt" says to print this document to the specified printer.