1

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?

3
  • 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
    Commented Feb 23, 2013 at 16:38
  • We are using the final version of SharePoint Server 2013. Commented Feb 26, 2013 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
    Commented Aug 22, 2013 at 17:04

0

Browse other questions tagged or ask your own question.