Migrate Presentation library from .NET Framework to .NET Core
26 Apr 20241 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.AspNet Syncfusion.Presentation.AspNet.Mvc5 |
|
Syncfusion.PresentationToPDFConverter.WinForms Syncfusion.PresentationToPDFConverter.Wpf Syncfusion.PresentationToPDFConverter.AspNet Syncfusion.PresentationToPDFConverter.AspNet.Mvc4 |
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 |
---|---|
Not applicable - It is handled internally. |
Property changes
Missing properties |
Alternate properties in .NET Core |
---|---|
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 |
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. | |
Presentation.Save(string fileName, FormatType formatType, HttpResponse response) |
You can save the document as stream and then download from browser. |
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
- Syncfusion.Presentation.WinForms
- Syncfusion.Presentation.Wpf
- Syncfusion.Presentation.AspNet.Mcv4
But, this is not a recommended approach.