SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use the PowerPoint Automation Service to convert documents from .ppt to .jpg. However even though I am trying to follow the msdn example (which is a bit different), it doesn't seem to work.

Here is my code:

SPFile sourceFile = SPContext.Current.Web.GetFile(sourceURL);
SPFolder folder = sourceFile.ParentFolder;
Stream inputStream = sourceFile.OpenBinaryStream();
SPFileStream outputStream = new SPFileStream(SPContext.Current.Web, 1024);

PictureRequest  request = new PictureRequest(inputStream,"ppt",PictureFormat.Jpg,outputStream);
IAsyncResult result = request.BeginConvert(SPServiceContext.GetContext(SPContext.Current.Site), null, null);

folder.Files.Add("convertedFileName.jpg", outputStream, true);

Whenever I do this, in line "request.EndConvert(result)" I get the following exception:

"The specified document could not be converted." 
System.Exception {Microsoft.Office.Server.PowerPoint.Conversion.ConversionException} 

StackTrace:  "at Microsoft.Office.Web.Common.AsyncResult`1.WaitForCompletion()   at Microsoft.Office.Server.PowerPoint.Conversion.Request.EndConvert(IAsyncResult result)"

Does anybody have any idea how to investigate that error or possibly fix?

share|improve this question
Don't feel bad I can't get their Word Automation Service or PowerPoint Conversion service to work proper;y. A lot of things in the SharePoint 2013 preview don't work as advertised even when you do the MSDN example line by line. – user15112 Feb 23 '13 at 16:38
We are using the final version of SharePoint Server 2013. – Rafał Saltarski Feb 26 '13 at 14:07
Hy ; have you find a solution for this error, i'm using MS SP2013 enterprise and i still have this error, all my services are started !! An idea ? thank's – user19079 Aug 22 '13 at 17:04

protected by Community Oct 24 '13 at 19:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Browse other questions tagged or ask your own question.