We already logged a ticket to test Aspose.PDF functionality under .NET 6.0 in non-Windows environments as PDFNET-50918. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
The issue PDFNET-50918 has been resolved and its fix will be available in the next version of Aspose.PDF for .NET i.e. 23.1. We will inform you via this forum thread once it is released.
My question though is what does PDFNET-50918 achieve or what is it about? I’m not getting the impression that that ticket addresses my concern, which is running Aspose.NET on Linux free of dependency from libgdiplus.
Unhandled exception. 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.GdipCreatePath(FillMode brushMode, IntPtr& path)
at System.Drawing.Drawing2D.GraphicsPath..ctor(FillMode fillMode)
at #=zsvLDtHYymYSUa8DU11ayP0AzVy2E.#=zbKquNXk=(#=zsODPSZ0YH7cYHfnSLvnnY4o= #=zw6Lhzwg=)
at #=zS5SNRUbbtWTK6OAdX2NPHtOMhwNyXL5AP7h8SEc2Pdbf.#=zfboVgr39N8qD(#=zYGXb8CavM8_p3pY5PAB54opjvDBTGw0ddQ== #=zw6Lhzwg=, #=zVHNVSjvqzpPxmjjoUMDTLeb4c7WLX71lTL9KBeA= #=zK9mO3gBWYYCM)
at #=zPkNwMxu1ye97RjWbr0ubC1pXYXnh40aLfmmm7Q7DZ7db..ctor(#=zf$LjgtDb7RTfB21nvJC49gMV0som #=zCluotbw=, #=zGuSEinf51GwaWgcLur1eBm3mrGF4wzzKWQ== #=zV1YhCCo=, #=zV71mTzZAOL89qaDq0fysgfzE$l19AzKf5NIzOBU= #=zz$tk4VrK1EvB)
at #=zaxtMu44FIXVnUVGZw1CmesjKYdRl943m0ark4eY=.#=zONxzAUroN1nE(#=zf$LjgtDb7RTfB21nvJC49gMV0som #=zCluotbw=, #=zGuSEinf51GwaWgcLur1eBm3mrGF4wzzKWQ== #=zV1YhCCo=, #=zV71mTzZAOL89qaDq0fysgfzE$l19AzKf5NIzOBU= #=zz$tk4VrK1EvB)
at Aspose.Pdf.Page.CalculateContentBBox()
at Aspose.Pdf.Page.#=z4EVFdC0=(Page #=zV1YhCCo=)
at Aspose.Pdf.Document.ProcessParagraphs()
at Aspose.Pdf.Document.#=zg9hU84stvRSb(Stream #=z$$huN9A=, SaveOptions #=zKUavTA6dqtXQ)
at Aspose.Pdf.Document.#=zhNNMKwgnXtgq(String #=zrjxxXxDi9NTq)
at Aspose.Pdf.Document.Save(String outputFileName)
at Program.<<Main>$>g__JpgToPdfA|0_1(String jpgFilename, String outputPdfFilename)
at Program.<Main>$(String[] args)
Moreover, Aspose.PDF v23.x on Nuget still has dependency on System.Drawing.Common. image.png (58.2 KB)
Aspose.Pdf.Drawing only needs System.Drawing.Common while using specific features like printing. Other than that, it does not acquire it and works independently. We have successfully test it under Linux like environments. Could you please make sure that you have removed existing Aspose.PDF for .NET from your project and kept only Aspose.Pdf.Drawing? Also, please make sure to use the latest version.