Mon Sep 19, 2022 10:55 am
Hi,
I have also the drawing issue on Linux.
See my stacktrace.
I use the "FreeSpire.PDF" Version="8.6.0" and the compile target is .net 6.0.
Do I use the right version or is this an issue?
Error Message:
Test method DigitalSales.Shared.Helper.Pdf.Tests.PdfConversion.PdfConverterTests.Shrink_Valid_Pdf_To_Two_Pages threw exception:
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See ... for more information.
Stack Trace:
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 System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at sprᦥ.ᜁ(Int32 A_0, Int32 A_1, Int32 A_2, Int32 A_3)
at sprᦥ.ᜁ(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Pdf.PdfDocumentBase.ᜀ(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Pdf.PdfDocumentBase.ᜁ(Int32 A_0)
at Spire.Pdf.PdfDocument.SaveAsImage(Int32 pageIndex)