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. Image for the cookie policy date
close icon

pptx generation

I was able to generate pptx but when I open the file using Powerpoint I got the error "PowerPoint Found a Problem with Content", after I click "Repair" got another message "powerpoint couldn't read some content and removed it"
Is there any way to avoid this message?
My code:
IPresentation pptxDoc = Presentation.Create();
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
IPresentation pptxDoc = Presentation.Create();
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
Thanks.

3 Replies

VA Vijayasurya Anandhan Syncfusion Team July 17, 2019 08:47 AM UTC

Hi Nick,

Thank you for contacting Syncfusion support.

We have tried to reproduce the issue, but it is working fine in our end.
Please find the sample used in our end to reproduce the issue from the below link:
https://www.syncfusion.com/downloads/support/forum/145991/ze/Presentation-481753907.zip

In this sample, we have done the following things:
 
1.   Created new instance of PowerPoint presentation. 
2.   Added new slide with blank type to the presentation. 
3.   Added a shape with text to the slide. 
4.   Saved the PowerPoint presentation. 
 
If still issue occurs in your end, we suspect that the problem might be due to code snippet used at your end. So, could you please provide us the code snippet which used at your end to reproduce the problem. Thereby we will analyze further and provide you the appropriate solution at the earliest.

Please let us know if you have any queries.


Regards,
Vijayasurya A
 



FK Fredrik Kronander replied to Vijayasurya Anandhan March 11, 2022 06:22 PM UTC

Hi,

I am evaluating your component to see if we can use it to generate Powerpoint reports for our platform, and I'm trying to stream the Presentation from our .NET Core backend to the frontend Angular application.
I have tried multiple ways to get a proper file for download but I'm doing something wrong as the file cnnot be opened.

I found this ticket and now use the same method in backend to stream a FileStreamResult to the client, where I then create a Blob with it and make the browser download it (the way I see many people do it).

Can you spot the error here or do you have a working example of how to best achieve this?

Thanks!




FK Fredrik Kronander replied to Fredrik Kronander March 11, 2022 06:43 PM UTC

Ah, skip my question - I realized that my response from the server now was a HttpResponse and not a direct Blob, so when I picked the body from the response the presentation becomes correct.




Loader.
Live Chat Icon For mobile
Up arrow icon