SharePoint Document Converter sample gives a start on how to add a control to document library ribbon and use same to convert document. This sample code convert documents of type "docx" or "doc" to any possible file type like PDF, XPS, DOT, XML etc etc.
Attached document contains details about:
- How solution works (with screenshots)
- Solution deployment using STSADM
- Solution deployment using PowerShell
Click here to view SharePoint Document Converter Guide