We now also have an option to convert word document in PDF in office 2010.
Well, now with SharePoint designer 2010 or word automation services, it is possible to convert word document to the PDF file and that too without any watermark.
Word automation service is only available in SharePoint server 2010 not in foundation server.
Word automation service can convert document to one format to another format. You can also do this programmatically as well.
It can read following file formats.
• Word 97-2003 Document (DOC) and Word 97-2003 Template (DOT)
• Rich Text Format (RTF)
• Single File Web Page (MHTML)
• HTML
• Word 2003 XML
• Word 2007/2010 XML
And it can write following file formats.
• XPS
• Office Open XML (DOCX, DOCM)
• Word 97-2003 Document (DOC)
• Rich Text Format (RTF)
• Single File Web Page (MHTML)
• Word 2007/2010 XML
So definitely this is a great move from MS and it was highly needed.
Before starting on this, we need to make sure that word automation service is started on the server.
Go to your central administration – Application management – Services on server and see that it is started, if not, then start it.

In this post, I am going to show you how to convert a document to different formats from word and from other formats.
This time we will start with the code. Yes, directly we jump in to the code because it is really easy to convert a document from code for the developers. Just to show you how it works, I am using documents in the same library and outputting the resulting converted documents to the same library.
Output library can also be different from the site. I yet have to check if it works for the site collection or not. But for the site, it definitely works.
You need to include one DLL reference in your project and that is Microsoft.Office.Word.Server.Conversions.ConversionJob.

Once you execute this code, you might have to wait for couple of minutes or more. It depends on the type of file you are converting. Check out different options in conversions.SaveFormat. There are different formats available.
Output from the same above code tried with different formats is shown below.

First is .docx, converted to .doc, .pdf and .xps.
Now one more thing to add here. When you have job object in your hand then you can query its conversion status. As I said earlier, for some file format conversions it might take few minutes.
ConversionJobStatus status = new ConversionJobStatus("Word Automation Services", job.jobId, null);
if (status.Count == status.Succeeded)
{
// converted
}
else if (status.Count == status.Failed)
{
//Not converted. It has failed
}
Read Part 2 for further reading.



























