Syncfusion® PowerPoint library is feature-rich and high-performance .NET PowerPoint library that allows you to create, manipulate and convert PowerPoint documents (PPTX, PPTM, POTX and POTM).
$ dotnet add package Syncfusion.PresentationRenderer.Net.CoreThe Syncfusion .NET Core PowerPoint library (Essential Presentation) allows you to add advanced PowerPoint Presentations processing functionalities to any .NET Core application and does not require Microsoft PowerPoint application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the PowerPoint presentation elements explicitly and perform necessary manipulation. Using this library, you can create, read, edit and convert PowerPoint presentation programmatically.
You can fetch the Syncfusion .NET Core PowerPoint library NuGet by simply running Install-Package Syncfusion.PresentationRenderer.Net.Core from the Package Manager Console in Visual Studio.
You can also try some code examples of common use cases from our GitHub Repository.
The following code example illustrates how to convert the PowerPoint Presentation to PDF.
using (FileStream fileStreamInput = new FileStream("Template.pptx", FileMode.Open, FileAccess.Read))
{
//Open the existing PowerPoint presentation.
using (IPresentation pptxDoc = Presentation.Open(fileStreamInput))
{
//Convert the PowerPoint document to PDF document.
using (PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc))
{
//Creates an instance of memory stream.
using (MemoryStream pdfStream = new MemoryStream())
{
//Save the converted PDF document to memory stream.
pdfDocument.Save(pdfStream);
}
}
}
}
The following code example illustrates how to convert the PowerPoint Presentation to image.
using (FileStream fileStreamInput = new FileStream("Template.pptx", FileMode.Open, FileAccess.Read))
{
//Open the existing PowerPoint presentation.
using (IPresentation pptxDoc = Presentation.Open(fileStreamInput))
{
//Initialize PresentationRenderer to perform image conversion.
pptxDoc.PresentationRenderer = new PresentationRenderer();
//Converts entire Presentation to image stream.
Stream[] streams = pptxDoc.RenderAsImages(ExportImageFormat.Jpeg);
foreach (Stream stream in streams)
{
//Create the output image file stream.
using (FileStream fileStreamOutput = File.Create("Output_" + Guid.NewGuid().ToString() + ".jpg"))
{
//Copy the converted image stream into created output stream.
stream.CopyTo(fileStreamOutput);
}
}
}
}
This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.
Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 26,000+ customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.
Today, we provide 1600+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, WinUI, Flutter and UWP). We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.
sales@syncfusion.com | www.syncfusion.com | Toll Free: 1-888-9 DOTNET