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.DocIO.WinForms


Syncfusion.DocIO.Wpf


Syncfusion.DocIO.AspNet


Syncfusion.DocIO.AspNet.Mvc4


Syncfusion.DocIO.AspNet.Mvc5

Syncfusion.DocIO.Net.Core

Syncfusion.DocToPDFConverter.WinForms


Syncfusion.DocToPDFConverter.Wpf


Syncfusion.DocToPDFConverter.AspNet


Syncfusion.DocToPDFConverter.AspNet.Mvc4


Syncfusion.DocIToPDFConverter.AspNet.Mvc5

Syncfusion.DocIORenderer.Net.Core

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

DocToPDFConverter

DocIORenderer

ChartToImageConverter

Not applicable - It is handled internally.

DocToPDFConverterSettings

DocIORendererSettings

Property changes

Missing properties Alternate properties in .NET Core

IWordDocument.ChartToImageConverter

Not applicable - It is handled internally.

WordDocument.ChartToImageConverter

Not applicable - It is handled internally.

DocToPDFConverterSettings.EnableFastRendering

This is the default approach in .NET Core and handled internally.

DocToPDFConverterSettings.RecreateNestedMetaFile

Not supported due to .NET Core limitations.

DocToPDFConverterSettings.ImageQuality

Not supported

DocToPDFConverterSettings.ImageResolution

Not supported

DocToPDFConverterSettings.PreserveOleEquationAsBitmap

Not supported due to .NET Core limitations.

SaveOptions.HtmlExportImagesFolder

Not applicable - You can save the images to folder using

SaveOptions.ImageNodeVisited

event in the application level.

SaveOptions.HtmlExportCssStyleSheetFileName

Not supported

SaveOption.HTMLExportImageAsBase64

This is the default approach in .NET Core and handled internally.

CssStyleSheetType.External

Not supported

Method Changes

Missing methods Alternate methods in .NET Core

WordDocument.Open(String)


WordDocument.Open(String, FormatType)

You can open the document as stream from the file system using

WordDocument.Open(Stream, FormatType)

API

WordDocument.Save(String)


WordDocumentSave(String, FormatType)

You can save the document as stream to the file system using

WordDocument.Save(Stream, FormatType)

API

WordDocument.Save(string fileName, FormatType formatType, HttpResponse response)

You can save the document as stream and then download from browser.

WParagraph.AppendPicture(Image)

You can open the image as stream and append in paragraph using AppendPicture(Stream imageStream) API.

MailMerge.Execute(OleDbDataReader)

Not supported due to .NET Core limitations.

MailMerge.Execute(IDataReader)

Not supported due to .NET Core limitations.

MailMerge.ExecuteGroup(IDataReader)

Not supported due to .NET Core limitations.

MailMerge.ExecuteNestedGroup(DbConnection, ArrayList)

Not supported due to .NET Core limitations.

MailMerge.ExecuteNestedGroup(DbConnection, ArrayList, Boolean)

Not supported due to .NET Core limitations.

ChartToImageConverter.SaveAsImage(IOfficeChart, Stream)

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

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