Conversion of RTF to PDF is scriptable with:
/System/Library/Printers/Libraries/convert
See another post for sample code.