Migrate Presentation library from .NET Framework to .NET Core

17 Feb 20231 minute to read

In this section, we will see about the changes which need to be considered while migrating Syncfusion .NET PowerPoint (Presentation) library from .NET Framework to .NET Core.

NuGet Packages

Packages targeting .NET Framework

Packages targeting .NET Standard 2.0/.NET Core

Syncfusion.Presentation.WinForms


Syncfusion.Presentation.Wpf


Syncfusion.Presentation.AspNet


Syncfusion.Presentation.AspNet.Mvc5


Syncfusion.Presentation.AspNet.Mvc4

Syncfusion.Presentation.Net.Core

Syncfusion.PresentationToPDFConverter.WinForms


Syncfusion.PresentationToPDFConverter.Wpf


Syncfusion.PresentationToPDFConverter.AspNet


Syncfusion.PresentationToPDFConverter.AspNet.Mvc4


Syncfusion.PresentationToPDFConverter.AspNet.Mvc5

Syncfusion.PresentationRenderer.Net.Core

Namespace changes

.NET Framework

Alternate Namespace in .NET Core

Syncfusion.PresentationToPdfConverter Syncfusion.PresentationRenderer
Syncfusion.OfficeChartToImageConverter Not applicable - Classes are moved within Syncfusion.PresentationRenderer namespace.

Type changes

Missing Types

Alternate Types in .NET Core

ChartToImageConverter

Not applicable - It is handled internally.

Property changes

Missing properties

Alternate properties in .NET Core

IPresentation.ChartToImageConverter

Not applicable - It is handled internally.

PresentationToPdfConverterSettings.EnablePortableRendering

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

PresentationToPdfConverterSettings.RecreateNestedMetafile

Not supported due to .NET Core limitations.

ITextBody.FitTextOption

Not supported

Method changes:

Missing methods

Alternate methods in .NET Core

Presentation.Open(String)

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

Presentation.Open(Stream)

API.

Presentation.Save(String)

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

Presentation.Save(Stream)

API.

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

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

IPresentationChart.SaveAsImage(Stream imageAsStream)

IPresentationRenderer.ConvertToImage(IPresentationChart chart, Stream outputStream)

Advantages

Supports Windows, macOS, Linux, docker, Azure, and AWS environments.

Known limitations

EMF and WMF images are not supported in .NET Core platform.

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.
  • The below features are make use of SkiaSharp graphics library, which are separated into a separate package, Syncfusion.PresentationRenderer.Net.Core
  • During PowerPoint Presentation 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.Presentation.ASP.NET NuGet in application targeting .NET Framework, you can consider to use anyone of the packages