Class PresentationRenderer
Specifies the Presentation Renderer class
Inheritance
System.Object
PresentationRenderer
Implements
Namespace: Syncfusion.PresentationRenderer
Assembly: Syncfusion.PresentationRenderer.NET.dll
Syntax
public class PresentationRenderer : Object, IPresentationRenderer
Constructors
PresentationRenderer()
Default constructor for Presentation Renderer class.
Declaration
public PresentationRenderer()
Properties
ExportChartImageOptions
Gets or sets the Chart to Image options.
Declaration
public ChartRenderingOptions ExportChartImageOptions { get; set; }
Property Value
Type |
---|
ChartRenderingOptions |
Methods
ConvertToImage(IPresentationChart, Stream)
Converts the specified chart into image with the image settings given.
Declaration
public void ConvertToImage(IPresentationChart chart, Stream outputStream)
Parameters
Type | Name | Description |
---|---|---|
IPresentationChart | chart | The chart which is to be converted to image. |
System.IO.Stream | outputStream | Stream to hold the converted image data. |
Remarks
This method is supported in NetStandard supported platforms only.
Examples
//Open a PowerPoint presentation
IPresentation presentation = Presentation.Open("Sample.pptx");
//Initialize the PresentationRenderer
presentation.PresentationRenderer = new PresentationRenderer();
//Gets the first instance of chart from slide
IPresentationChart chart=presentation.Slides[0].Charts[0];
// Converts the chart to image.
Stream image = new FileStream("Sample.png", FileMode.Create, FileAccess.ReadWrite);
presentation.PresentationRenderer.ConvertToImage(chart, image);
//Close the PowerPoint presentation
presentation.Close();
ConvertToImage(ISlide, ExportImageFormat)
Declaration
public Stream ConvertToImage(ISlide slide, ExportImageFormat imageFormat)
Parameters
Type | Name | Description |
---|---|---|
ISlide | slide | |
ExportImageFormat | imageFormat |
Returns
Type |
---|
System.IO.Stream |