Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Dec 23, 2021 7:49 am

Hi,

As per the subject the system.drawing.common dependency is no longer supported on linux (as per the article below) on .net 6.

https://docs.microsoft.com/en-us/dotnet ... ndows-only

We are currently using the .net 5 version of the Spire.Doc library which has a dependency to System.Drawing.Common, however the rest of the versions seem to use SkiaSharp which would be preferable in our case. Is there any reason why System.Drawing.Common is still being used just in that version? Can this be removed?

Cheers,
Felix

felix@kalixhealth.com
 
Posts: 20
Joined: Sat Nov 07, 2015 4:10 am

Thu Dec 23, 2021 10:12 am

dlls.png
Hello,

Thanks for your inquiry!

The reason of our products still use System.Drawing under the NET5.0 and NET6.0 framework is: Under the Windows system, the System.Drawing has a better effect on handling the images than SkiaSharp. It will take shorter time and generate the image in better quality.

We noticed that System.Drawing only supported on Windows in NET6.0 as you mentioned. If you want to use SkiaSharp under NET5.0 or run the project under NET6.0 in Linux, please follow the next steps to use the NetStandard dlls which based on SkiaSharp to your project manually.

Please download Spire.Doc from our website, and manually add the DLLs from the folder “netstandard2.0” (see screenshot). In addition, you need to install the following dependencies via NuGet.


• SkiaSharp (>= 1.68.0)
• System.Buffers (>= 4.5.0)
• System.Memory (>= 4.5.0)
• System.Runtime.CompilerServices.Unsafe (>= 4.5.0)
• System.Security.Cryptography.Xml (>= 4.5.0)
• System.Text.Encoding.CodePages (>= 4.5.0)

We also plan to release another product for Spire.Doc on Nuget, so that the users who want to make a NET6.0 project under Linux environment or who want to use SkiaSharp in Net Core project can use the DLL more convenience. It is expected to be released in the next version. Once we release it, I will notify you ASAP.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Dec 31, 2021 2:48 am

Hi,

It looks like for the latest version that just released that the '.Net Standard' version has also been changed to use System.Drawing.Common? So in this case there doesn't seem to be a version that can be used in Linux for .net6? Is that right?

https://www.nuget.org/packages/Spire.Doc/9.12.12

Cheers,
Felix

felix@kalixhealth.com
 
Posts: 20
Joined: Sat Nov 07, 2015 4:10 am

Fri Dec 31, 2021 9:53 am

Hello,

Thank you for your follow-up.
The latest version of Spire.Doc does not include .netstandard on Nuget. Please install Spire.Officefor.NETStandard through Nuget Manager to run your project.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Sat Jan 01, 2022 1:04 am

Hi Anika,

The latest version does support .net6 specifically, which is good - this is what we are using. But it does have the problem still of using System.Drawing.Common which is not supported for linux anymore.

I'm happy to switch over to using the new Spire.Officefor.NETStandard package, but I have a few questions about it:

1) This package has all the other components correct? We are just using Spire.Doc (and I guess also Spire.PDF since that is included), so it would be unfortunate if we have to add the extra components that we won't use. Our license will still work correct?

2) Is this nuget going to be updated moving forward? It seems to be brand new and not included in your main nuget account. It seems like a workaround at the moment rather than a new official library? We would prefer to wait for a proper Spire.Doc update for .net 6 if that is the case.

Cheers,
Felix

felix@kalixhealth.com
 
Posts: 20
Joined: Sat Nov 07, 2015 4:10 am

Tue Jan 04, 2022 5:35 am

Hello Felix,

Thanks for your feedback!

Since NET6.0 itself does not support the System.Drawing.Common under the Linux environment, our current solution is to use ordinary Spire.Doc or corresponding products for projects only under Windows; but use Spire.Office for Netstandard for cross-platform projects (Linux and Windows).

Although Spire.Office for Netstandard includes all of our products, it does not affect the use of the products you have purchased. You only need to apply the license in the program as before, and our product will automatically cancel the limits of the corresponding product according to the license. If you don't want to add the extra components, you can delete other dll references about spire except Spire.doc, spire.pdf and spire.license.

We will continue to update this library on the Nuget. This library is our official version, and its release account also belongs to our official account. You can use this library with peace of mind.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 11, 2022 7:24 pm

Would this also be the case when targeting .net core 3.1? We're trying to run it on aws and getting the following error:

Error message: The type initializer for 'Spire.Xls.Core.Spreadsheet.XlsPageSetupBase' threw an exception.

hunterwilliamswex
 
Posts: 1
Joined: Tue Jan 11, 2022 7:21 pm

Wed Jan 12, 2022 3:22 am

Hello,

Thanks for your inquiry!

Sorry to tell you that we don't know much about AWS, to help us further look into your issue, could you please share with us the detailed steps of your test or some guide articles? And please also provide your test project. You could send it to us(support@e-iceblue.com) via email. Thanks in advance.

Besides, according to the error message you provide, I guess this issue may be caused by that the running environment lacks of the System.Drawing native dependencies. You can try to install the libc6-dev, libgdiplus,libx11-dev to your running environment and then test again.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Jan 17, 2022 6:48 am

Hello,

Hope you are doing well!

Has the issue been solved now? Could you please give us some feedback at your convenience?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Mar 08, 2022 2:54 am

Hi,
I am facing the same issue. Upgraded to .net 6 and using two nuget package Spire.Doc(10.2.11) and Spire.Pdf(8.2.2).
Application run on windows environment without any issue but running inside docker container throwing exception.

I tried even Spire.Office latest version with no luck.
Application running inside docker container.

Please provide the solution ASAP.

kulwinder
 
Posts: 6
Joined: Tue Feb 03, 2015 9:14 pm

Tue Mar 08, 2022 8:25 am

Hello kulwinder,

Thanks for your inquiry.
Based on your description, I suggest you to use Spire.Officefor.NETStandard based on SkiaSharp. This component is specially designed for users who want to make a NET6.0 project under Linux environment or who want to use SkiaSharp in Net Core project can use the DLL more convenience. Please download this component(Spire.Officefor.NETStandard 7.2.3) via Nuget Manager and test it again.
If the issue still exists after testing, please provide the following information. You could attach them here or send them to us via email (support@e-iceblue.com). Thanks in advance.
1) Your complete test project.
2) Your input files.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Thu Mar 17, 2022 3:13 am

I tried the package suggested in above reply. I am getting error

Could not load file or assembly 'Spire.License, Version=1.4.0.320, Culture=neutral, PublicKeyToken=b1144360237c8b3f'. The system cannot find the file specified.

I am using following source code to set the two licence keys. I was successfully working for the individual packages.

Spire.License.LicenseProvider.SetLicenseKey("license key of license1");
Spire.License.LicenseProvider.LoadLicense();
Spire.License.LicenseProvider.SetLicenseKey("license key of license2");
Spire.License.LicenseProvider.LoadLicense();

Do i need another licence key now?

Just couple of questions to verify. what would happend to my licence to Spire.Pdf and Spire.Doc? Will i get the latest version in the nuget package you suggested. So going forward i will keep using Office package rather than individual packages?

kulwinder
 
Posts: 6
Joined: Tue Feb 03, 2015 9:14 pm

Thu Mar 17, 2022 6:38 am

Hello,

Thanks for your feedback.
Please remove all dlls related to our products in the project, and then install Spire.Officefor.NETStandard 7.2.3 through Nuget Manager. If the problem still exists after trying, please provide your test project (which can reproduce your question) for our further investigation. You could attach it here or send it to us via email (support@e-iceblue.com). Thanks in advance.
Also, if you want to use both Spire.Doc and Spire.PDF in one project, using the office package is the best option.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Mon Jan 16, 2023 1:48 pm

Is there any update on this issue? Is it possible to switch back to Spire.PDF?

lapidservicegmbh
 
Posts: 2
Joined: Wed Aug 04, 2021 12:45 pm

Tue Jan 17, 2023 3:48 am

Hello,

Thanks for your inquiry.
Now, NET6.0 and NET7.0 itself does not support the System.Drawing.Common under the Linux environment, so if you are using NET6.0 or NET7.0 under Linux environment, I also suggest you using Spire.Office for Standard, however, don’t worry, if you only purchase Spire.Pdf, your license also is valid for the PDF function of Spire.Office for NetStandard.
In addition, for other NetFramework (such as NetFramework4.8、NetCore3.0), you can use Spire.Pdf under Linux environment.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 860
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.Doc

cron