Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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);
request.EndConvert(result);

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 answers, posting an answer now requires 10 reputation on this site.

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

Browse other questions tagged or ask your own question.