Hi @andrey.potapov, I tried to create a sample project but I’m having some problems, I can’t reproduce the problem because I’m facing with a GDI error and I don’t knopw why, my sample project is very similar to my official project.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'gdiplus.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
As you can see, my project is configured to run on Linux, but I intend tu use the same project to run on windows too, and docker desktop created a Windows Image correcly even with the project configured for Linux.
I noticed my official project is showing the related DLLs as you can see here:
but in my sample project they didn’t appear
:
Sorry @andrey.potapov, I tried too many things that I don’t remember very well.
The original error was correct, but using Aspose.Slides.NET version 23.5.0. Now I updated my official project to version 23.8.0 had the same problem as my sample project, the gdiplus.dll error. And I noticed that System.Drawing was deleted from Aspose Slides, right? Because this code doesn’t work anymore for thumbnail generation:
using (Presentation presentation = new Presentation(OriginalFilePath))
{
using (Bitmap bitmap = presentation.Slides[0].GetThumbnail())
{
bitmap.Save(ThumbnailFilePath, ImageFormat.Jpeg);
}
}
@jean.heidemann,
Starting with version 23.6, there are some changes related to the System.Drawing.Common library. Please look at the following information:
I updated my project with the libraries available as described in the release notes (but version 23.8) and I’m still facing the same problem.
Could you see my updated project here?
Here is the error
System.DllNotFoundException: Unable to load DLL 'aspose.slides.drawing.capi_vc14x64' or one of its dependencies: T
he specified module could not be found. (0x8007007E)
at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, B
oolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullab
le`1 searchPath, Boolean throwOnError)
at System.Runtime.InteropServices.NativeLibrary.Load(String libraryName, Assembly assembly, Nullable`1 searchPa
th)
at ♠↨▬▬.☻(String ☻, Assembly ♥, Nullable`1 ♣)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly,
Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at ♠↨▬▬.c(IntPtr& a)
at System.Drawing.StringFormat.get_GenericTypographic()
at ♥↨▬▬..ctor(Bitmap ☻)
at ♠☻↓▬..ctor(Int32 ☻, Int32 ♥, Single ♣, Single, Boolean ♠, ☼↨▬▬ ♫, ♣♥▬☼ist`1 ☻☻)
at Aspose.Slides.Slide.☻(Boolean ☻, ♣↓♣☼ ♥, ☼↨▬▬ ♣, List`1, InterruptionToken ♠)
at ♣♥→▬.☻(Presentation ☻, Stream ♥, Int32[] ♣, PdfOptions, InterruptionToken ♠)
at ♣♥→▬.♥(Presentation ☻, Stream ♥, PdfOptions ♣, InterruptionToken)
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at AsposeSlidesWindowsContainer.Controllers.PowerPointConverter.Convert(Stream file) in C:\src\Controllers\Powe
rPointConverter.cs:line 23
at AsposeSlidesWindowsContainer.ConversionController.UploadFile(IFormFile file) in C:\src\ConversionController.
cs:line 24
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-44189
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@jean.heidemann,
Our developers have investigated the case and discovered that the files aspose.slides.drawing.capi_vc14x64.dll, aspose.slides.drawing.capi_vc14x86.dll and libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so are not automatically copied to the net6.0 folder. To resolve this issue, please add the following script to your .csproj project file:
@jean.heidemann,
Our developers have investigated the case and found that under Docker (Linux), some libraries required by the Aspose.Slides library are missing.
To resolve this issue, a script needs to be added to the Dockerfile to install the missing libraries:
@jean.heidemann,
In the sample project you provided, the base image in the Dockerfile is mcr.microsoft.com/dotnet/aspnet:6.0, which means the Docker container is running on Linux Debian (or Alpine). Could you kindly clarify what is wrong?
@andrey.potapov , this base image works on both, Linux and Windows. My problem is the error while converting a PowerPoint file to PDF when using a Docker Windows image of my service