We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Open/Create presentation in Azure function

Thread ID:

Created:

Updated:

Platform:

Replies:

141724 Dec 29,2018 04:35 AM UTC Jan 2,2019 08:33 AM UTC ASP.NET MVC 3
loading
Tags: Presentation
Frank Sposaro
Asked On December 29, 2018 04:35 AM UTC

Hi all,

I'm trying to build a processing pipeline using Azure Logic App.

When a form response is received it will trigger an Azure function that will create a PPTX.

The function copies a template pptx to a memory stream from Azure storage blob, makes modifications, and then uploads the stream back to the blob.
However, I am running into issues opening the presentation from the stream.

Any Ideas?

            blob = container.GetBlockBlobReference("template.pptx");

            Stream inStream = new MemoryStream();

            blob.DownloadToStream(inStream);

            using (IPresentation pptxDoc = Presentation.Open(inStream))
            {
                /* Make modifications here */
               
                pptxDoc.Save(inStream);

                blob.UploadFromStream(inStream);
                return new HttpResponseMessage(HttpStatusCode.OK);
            }

Karthikeyan Chandrasekar [Syncfusion]
Replied On December 31, 2018 10:28 AM UTC

Hi Frank, 
We suspect different version of “Syncfusion.Licensing” assembly is referred in Azure Function sample, which gives error on runtime while opening or creating the Presentation using our Syncfusion Presentation library. Could you please ensure whether below referred assemblies are in same version?   
Syncfusion.Presentation 
Syncfusion.OfficeChart 
Syncfusion.Compression 
Syncfusion.Licensing 

Still if you are facing same error, please send us the stack trace of the error. So that we can proceed further in this and provide you a solution. 
Regards, 
Karthikeyan  


Frank Sposaro
Replied On December 31, 2018 06:55 PM UTC

You are correct. I dug deeper through the logs and found this error:

"Could not load file or assembly 'Syncfusion.Licensing, Version=16.4450.0.44, Culture=neutral, PublicKeyToken=123...321' or one of its dependencies. The system cannot find the file specified.

Please see the Sync Fusion versions I am using below. How can I get around this issue, which version should I be using? I double checked and there wasn't a nuget update for this.



Karthikeyan Chandrasekar [Syncfusion]
Replied On January 2, 2019 08:33 AM UTC

Hi Frank, 
Syncfusion.Presentation.AspNet.Mvc5 NuGet is compatible only with MVC application which is targeting framework 4.5. So if your application framework is different than 4.5 you should use the Syncfusion.Presentation.WinForms NuGet which will be compatible in 2.0, 3.0, 4.5, 4.5.1 and 4.6 frameworks.

By installing Syncfusion.Presentation.WinForms NuGet in your Azure Function application instead of Syncfusion.Presentation.AspNet.Mvc5 NuGet, you can resolve this issue.

Please let me know if you have any questions. 
Regards, 
Karthikeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;