Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 24, 2026 2:32 am

In the cross-platform project of .Net 7, Spire.pdf.dll strongly depends on System.Drawing.Common. Microsoft officially prohibited the use of libgdiplus on non-Windows systems since Net 7 and later versions. This directly led to the inability to use System.Drawing.Common. So, when will Spire.pdf stop using System.Drawing?Or there may be other solutions that can be used in Linux with Spire.pdf?

microsoft:
Starting in .NET 7, the System.Drawing.EnableUnixSupport switch has been removed and you can no longer use the System.Drawing.Common package on non-Windows operating systems.

Error in Linux:
[16:29:00 ERR] The type initializer for 'Gdip' threw an exception.
System.TypeInitializationException: The type initializer for 'Gdip’threw an exception.
--> System.PlatformiNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms.

982881714
 
Posts: 1
Joined: Tue Mar 24, 2026 2:15 am

Tue Mar 24, 2026 3:49 am

Hello,

Thanks for your inquiry.
For cross-platform scenarios, please directly search for and install Spire.PDFfor.NETStandard via NuGet.It uses SkiaSharp as its graphics processing tool instead of System.Drawing.Common. If you have any further questions, please feel free to write back.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 764
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF

cron