in reply to Doc to Pdf conversion

You can automate OpenOffice through OpenOffice::UNO.