I’m currently trying to create presentation out of a AWS Lambda function. Unfortunately, during the initialization of Aspose.Slides, a Exception is thrown:
One or more errors occurred. (The type initializer for ‘Gdip’ threw an exception.): AggregateException
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at lambda_method(Closure , Stream , Stream , LambdaContextInternal )
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, HandleRef scan0, IntPtr& bitmap)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at Aspose.Slides.Slide.GetThumbnail(Size imageSize)
at .( , IPresentation )
at .(IPresentation , Stream , PresentationTypeEx , IPptxOptions , InterruptionToken )
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)
at serverless_pptexporter_processor_csharp.Function.FunctionHandler(String input, ILambdaContext context) in C:\Users\Max\source\repos\ppt\ppt\Function.cs:line 54
Unable to load shared library ‘libdl’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory: DllNotFoundException
at Interop.Libdl.dlopen(String fileName, Int32 flag)
It looks like the dependency “Libdl” is missing or can’t be found in this linux environment. I’ve already added the NuGet package “System.Drawing.Common” to my project, but this didn’t help.
Does anybody know how to get this working?