You can automate OpenOffice through OpenOffice::UNO.
In reply to Re: Doc to Pdf conversion by Corion in thread Doc to Pdf conversion by soubalaji