OutOfMemoryException and GDI+ Exceptions Are Thrown in Aspose.Slides 21.11

Hello again

First of all, here is the code used for opening and generating thumbnails, is there anything incorrect ?

I am using aspose.slides x86 version on windows 10 64bits.

Presentation file weights over 700mo.

Thanks for your help

try
{
using (var stream = new FileStream(pptpath, FileMode.Open))
{
presentation = new Presentation(stream, new LoadOptions()
{
BlobManagementOptions = new BlobManagementOptions()
{
IsTemporaryFilesAllowed = true,
MaxBlobsBytesInMemory = 50 * 1024 * 1024 // 50 MB
}
});

//export img
if (presentation != null && presentation.Slides.Count > 0)
{
for (int i = 0; i < presentation.Slides.Count; i++)
{
Slide s = (Slide)presentation.Slides[i];
if (!s.Hidden)
{
try
{
Bitmap bmp = s.GetThumbnail(scaleX, scaleY);
bmp.Save(thumbspath + @"\Slide" + (i + 1).ToString("0000") + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
bmp.Dispose();
bmp = null;
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
}
}
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
}

@kokilol,
Thank you for the code example. It will take me a while to answer. We will reply to you as soon as possible.

@kokilol,
Your code example for generating thumbnails looks correct. For opening large presentations, you should also use BlobManagementOptions.PresentationLockingBehavior property as shown below:

LoadOptions loadOptions = new LoadOptions
{
   BlobManagementOptions = new BlobManagementOptions
   {
       //...
       PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked,
       //...
   }
};

Documents:
Open Large Presentation
Load a Large Presentation as BLOB
Frequently Asked Questions

Please read the following article to get instructions for configuring the target platform:

Hi i will try this in real conditions and let you know. Thank you

Hi
I tried with 1.7go PowerPoint and this worked beautifully, this is huge !
So many thanks Andrey

Are you working on keynote support ? :slightly_smiling_face:

Bye thanks

Hi i will try this in real conditions and let you know. Thank you

@kokilol,
Unfortunately, Aspose.Slides does not support the format of presentations for Keynote application by Apple. I linked this forum thread to the appropriate task with ID SLIDESNET-25966 in our issue tracking system. But as far as I can see there are no immediate plans to support this format. You will be notified when the issue is resolved.

A post was split to a new topic: Does .NET License Work as for .NET Core?

Hi Andrei how are you ?
What best value do you recommend as “MaxBlobsBytesInMemory” for powerpoint file up to 6Go and average with few 100Mo ? (default:50Mo)
considering that dozens of powerpoint file will be converted simultaneously.
Thanks

@kokilol,
I’m fine, thanks. Unfortunately, I don’t have information for your request. You should test your results using various values for this parameter to find out the best one for your environment and use cases.

Hi
Alright thanks
And is there a possible way to have it working on keynote ?

@kokilol,
I’m not sure I understood your question. Could you please describe your requirements in more detail?

Is this scheduled to have an aspose.slides version working for keynote ? (Export slides to pictures)

@kokilol,
Unfortunately, as far as I can see, there are no plans for supporting Apple Keynote format in Aspose.Slides.

Thanks.
Do you think that technically possible or perfectly uncompliant ?

@kokilol,
Adding support for Apple Keynote file format is a really huge task. Besides, there is no open free specification for this format. There are also some technical issues with implementing such support in Aspose.Slides.

So that’s possible but quite long work.

@kokilol,
Yes, it is true.

A post was split to a new topic: Getting Exception when Loading Any PowerPoint Presentation

We had same error. Following code worked for us.

var loadOptions = new Aspose.Slides.LoadOptions();
loadOptions.BlobManagementOptions.IsTemporaryFilesAllowed = true;
loadOptions.BlobManagementOptions.TempFilesRootPath = temp_folder;
using (var ppt = new Aspose.Slides.Presentation(filePath, loadOptions))
{
	 .....................
}

@Chiman,
Thank you for the comment. If you have any problems using Aspose.Slides, please create a new forum thread.