The Syncfusion .NET PowerPoint Library offers powerful and comprehensive APIs to convert a PowerPoint presentation into an image programmatically with just a few lines of code and without Microsoft PowerPoint or interop dependencies. It allows you to convert an entire presentation into images or a single slide into an image, which can then be used to provide a document preview, thumbnail, or for printing purposes.
This example code shows how to convert a PowerPoint presentation to images by using the Syncfusion .NET PowerPoint Library and just a few lines of C#.
using Syncfusion.Presentation;
using Syncfusion.PresentationRenderer;
//Open an existing presentation
using (FileStream inputStream = new FileStream("Template.pptx", FileMode.Open, FileAccess.Read))
{
//Load the presentation
using (IPresentation presentation = Presentation.Open(inputStream))
{
//Initialize PresentationRenderer
presentation.PresentationRenderer = new PresentationRenderer();
//Convert the PowerPoint presentation as image streams
Stream[] imageStreams = presentation.RenderAsImages(ExportImageFormat.Jpeg);
//Save the image streams to file
for (int i = 0; i < imageStreams.Length; i++)
{
using (Stream imageStream = imageStreams[i])
{
using (FileStream outputStream = new FileStream("Image" + i + ".jpg", FileMode.Create, FileAccess.Write))
{
imageStream.CopyTo(outputStream);
}
}
}
}
}
The built-in font substitution event allows you to choose alternate fonts from the device or upload fonts when a font used in a presentation is not available in the environment where the conversion is occurring.
Configure fallback fonts for Unicode text to handle missing glyphs in fonts, ensuring all text is rendered correctly.
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Product Updates
Technical Support
The .NET PowerPoint Library supports converting images from PPTX, PPTM, POTX, and POTM formats only.
Yes, you can perform PowerPoint-to-image conversion on Linux and cloud platforms like Azure, AWS, and GCP with the .NET PowerPoint Library.
If required fonts aren’t installed, the Syncfusion PowerPoint Library uses alternatives, possibly causing differences in generated images. Refer to this knowledge base article for solutions to resolve this issue.
Yes, you can programmatically open password-protected PowerPoint presentations and convert them to images by using the .NET PowerPoint Library.
Yes, you can convert specific slides in PowerPoint presentations to images using the .NET PowerPoint Library.
You can access it through the Syncfusion.PresentationRenderer.Net.Core NuGet package. Detailed code samples and a tutorial video are available in the documentation to help.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.