We have been using an older version of Spire.Presentation and .NET 3.1 on Linux and macOS to generate PNG images with good success. I'm testing the newest 8.7.0 release with .NET 7.0 and it looks like System.Drawing and libgdiplus are no longer supported.
Does Spire.Presentation support SkiaSharp or any other graphics engines for non-Windows platforms? If so, is there an example of how to set it up? Below is an example of an error I get on Linux.
Thanks!
- Code: Select all
System.AggregateException: One or more errors occurred. (Microsoft PowerPoint 2007 file is corrpt.)
---> Spire.Presentation.DocumentUnkownFormatException: Microsoft PowerPoint 2007 file is corrpt.
---> System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, IntPtr scan0, IntPtr& bitmap)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at spr..ctor(spr᪕ A_0, spr᪔ A_1)
at spr᪔.ᜀ()
at spr᪔.ᜁ(spr㎜ A_0)
at spr᪔..ctor(Stream A_0, Boolean A_1)
--- End of inner exception stack trace ---
at spr᪔..ctor(Stream A_0, Boolean A_1)
at spr.ᜁ(Stream A_0)
at spr.ᜃ(Stream A_0)
at spr..ctor(String A_0, sprᰮ A_1)
at spr..ctor(String A_0)
at Spire.Presentation.Presentation.LoadFromFile(String file)