I'm trying to convert a DOCX file into a PDF file using a workflow in Sharepoint 2010 using Word Automation Services.
Here is what I use in my workflow :
ConversionJobSettings jobSettings = new ConversionJobSettings(); jobSettings.OutputFormat = SaveFormat.PDF; ConversionJob pdfConversion = new ConversionJob("Word Automation Services", jobSettings); pdfConversion.UserToken = workflowProperties.Web.CurrentUser.UserToken; string wordFile = workflowProperties.WebUrl + "/" + workflowProperties.Item.Url; string pdfFile = wordFile.Replace(".docx", ".pdf"); pdfConversion.AddFile(wordFile, pdfFile); pdfConversion.Start();
But no PDF is ever created. The workflow is defined as "Completed", but I saw nothing else. I checked the state of the Workflow Automation Services in the Central Administration and everything looks good and the service is started. The Word file is in a document library and I want to create the PDF file in the same folder as the Word file.
Does someone know what to do in order to convert Word to PDF ?