Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Sun Dec 05, 2021 9:41 pm

Hi Support Team,
I need to create thumbnails from pptx slides. The code I use works fine but not with the attached pptx file - a basic pptx file using a basic design, it takes minutes to run this code:
Code: Select all
                var x = pptxDoc.SlideSize.Size.Width;
                var y = pptxDoc.SlideSize.Size.Height;
                var r = (y / x);

                foreach (ISlide slide in pptxDoc.Slides)
                {
                    var img = slide.SaveAsImage(280, Convert.ToInt32(280 * r));
                    using (MemoryStream memoryStream = new MemoryStream())
                    {
                        img.Save(memoryStream, ImageFormat.Jpeg);
                    }
                }


I hope you can help me, regards Christian

PrintPro
 
Posts: 55
Joined: Tue Apr 16, 2019 6:17 pm

Mon Dec 06, 2021 4:08 am

Hello,

Thanks for your inquiry!

I tested the file and code you provided, but I did not reproduce your issue. It only took me 40 seconds to run the whole code.
costtime.png


To help us reproduce your issue quickly and efficiently, please provide us with the following information for further investigate. Thanks in advance.

1. Your target framework. (E.g. .net framework 4.8.0)
2. Your project type. (E.g. console app)
3. Your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese)

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Dec 06, 2021 5:37 am

Hello Marcia,
that's exactly the problem. I takes 40 seconds for a small 170Kbyte pptx file with only two simple slides. Pls try the same code with other pptx files and you will see that it will take only half a second.
The file was made with the latest MS PowerPoint using one of the predefined Themes. When I change the theme it works perfect.

Greetings Christian

PrintPro
 
Posts: 55
Joined: Tue Apr 16, 2019 6:17 pm

Mon Dec 06, 2021 6:17 am

Hello,

Thanks for your feedback!

Okay, I have submitted the need of optimizing the conversion time to our Dev team with the ticket SPIREPPT-1782 for further investigations.

If there is any update, we will keep you informed. Sorry for the inconvenience caused.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Dec 06, 2021 9:29 am

40 seconds for a single image is a bit more then a "optimizing" job, but I am happy that you are going to "fix" it.

Best Greetings Christian

PrintPro
 
Posts: 55
Joined: Tue Apr 16, 2019 6:17 pm

Mon Dec 06, 2021 10:01 am

Hello,

You are welcome.

Once there is any progress regarding the issue SPIREPPT-1782, we will notify you immediately.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 25, 2022 10:21 am

Hello,

Thanks for your patience!

Glad to inform you that we just released Spire.Office Platinum Version:7.1 which fixes the issue SPIREPPT-1782.

Please download the fix version from the following links to test.

Website link: https://www.e-iceblue.com/Download/download-office-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.Office/7.1.4
https://www.nuget.org/packages/Spire.Officefor.NETStandard/7.1.4

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Feb 09, 2022 7:51 am

Hello,

Hope you are doing well!

Has the issue been solved now? Could you please give us some feedback at your convenience?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.Presentation