Migrate DocIO library from .NET Framework to .NET Core
29 Nov 20242 minutes to read
In this section, we will see about the changes which need to be considered while migrating Syncfusion® .NET Word (DocIO) library from .NET Framework to .NET Core.
NuGet packages
Packages targeting .NET Framework | Packages targeting .NET Standard 2.0/.NET Core |
---|---|
|
|
Syncfusion.DocToPDFConverter.WinForms Syncfusion.DocToPDFConverter.Wpf Syncfusion.DocToPDFConverter.AspNet Syncfusion.DocToPDFConverter.AspNet.Mvc4 |
Namespace changes
.NET Framework | Alternate Namespace in .NET Core |
---|---|
Syncfusion.DocToPDFConverter | Syncfusion.DocIORenderer |
Syncfusion.OfficeChartToImageConverter | Not applicable - Classes are moved within Syncfusion.DocIORenderer namespace. |
Type changes
Missing Types | Alternate Types in .NET Core |
---|---|
DocIORenderer | |
Not applicable - It is handled internally. | |
DocIORendererSettings |
Property changes
Missing properties | Alternate properties in .NET Core |
---|---|
Not applicable - It is handled internally. | |
Not applicable - It is handled internally. | |
This is the default approach in .NET Core and handled internally. | |
Not supported due to .NET Core limitations. | |
Not supported | |
Not supported | |
Not supported due to .NET Core limitations. | |
Not applicable - You can save the images to folder using event in the application level. | |
Not supported | |
This is the default approach in .NET Core and handled internally. | |
Not supported |
Method Changes
Missing methods | Alternate methods in .NET Core |
---|---|
|
You can open the document as stream from the file system using API |
|
You can save the document as stream to the file system using API |
WordDocument.Save(string fileName, FormatType formatType, HttpResponse response) |
You can save the document as stream and then download from browser. |
You can open the image as stream and append in paragraph using AppendPicture(Stream imageStream) API. | |
Not supported due to .NET Core limitations. | |
Not supported due to .NET Core limitations. | |
Not supported due to .NET Core limitations. | |
Not supported due to .NET Core limitations. | |
MailMerge.ExecuteNestedGroup(DbConnection, ArrayList, Boolean) |
Not supported due to .NET Core limitations. |
WChart.SaveAsImage() |
Advantages
Supports Windows, macOS, Linux, docker, Azure, and AWS environments.
Known limitations
EMF and WMF images are not supported in .NET Core platforms.
Notable changes
- Graphics library: In .NET Framework, our library makes use of System.Drawing.Common for any text measuring and graphics-related operations. Whereas in .NET Core, our library uses the SkiaSharp graphics library to provide the same type of graphics operations in all the supported environments.
- The below features are make use of SkiaSharp graphics library, which are separated into a separate package, Syncfusion.DocIORenderer.Net.Core.
- During Word to PDF/Image conversion, if you are facing font-related problems (like accessing font from the environment), you can pass the fonts as streams using our font substitution approach.
NOTE
If you want to migrate without any code changes from “Syncfusion.DocIO.ASP.NET” NuGet in application targeting .NET Framework, you can consider to use anyone of the packages
- Syncfusion.DocIO.WinForms
- Syncfusion.DocIO.Wpf
- Syncfusion.DocIO.AspNet.Mcv4
But, this is not a recommended approach.