OfficeToPDF is a command line utility that converts Microsoft Office 2007 and 2010 documents from their native format into PDF using Office’s in-built PDF export features.

OfficeToPDF is useful (and unique) if you want to automatically create PDF files on a server-wide basis and free individual users from an extra step of using the “Save as…” command on their Office files.

software needs to be installed on Server:
.NET Framework 4
Office 2010 or Office 2007

If you are using Office 2007, you will also need:
Visual Studio 2010 Tools for Office Runtime [Download]
2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS [Download]

Supported File Types:
Word (.doc, .dot, .docx, .dotx, .docm, .dotm)
Excel (.xls, .xlsx, .xlsm)
Powerpoint (.ppt, .pptx, .pptm)
Visio (.vsd)
Publisher (.pub)

Download Office 2 PDF
How to execute on command line?

C:\prakash>officetopdf.exe test.docx test.pdf