[]
The Render extension method follows the same general rendering workflow across supported platforms. However, saving or downloading generated output depends on the application's execution environment.
WinForms applications can save generated files directly to writable file-system locations.
The following example renders an existing WinForms FlexChart control to PDF.
using C1.Chart;
using C1.Pdf;
// flexChart1 is an existing configured WinForms FlexChart.
using (var doc = new C1PdfDocument())
{
float margin = 72;
float width = doc.PageSize.Width - 2 * margin;
float height = 240;
flexChart1.Render(doc, margin, margin, width, height);
doc.Save("Chart.pdf");
}Imports C1.Chart
Imports C1.Pdf
' flexChart1 is an existing configured WinForms FlexChart.
Using doc As New C1PdfDocument()
Dim margin As Single = 72.0F
Dim width As Single = doc.PageSize.Width - 2 * margin
Dim height As Single = 240.0F
flexChart1.Render(doc, margin, margin, width, height)
doc.Save("Chart.pdf")
End UsingThe same rendering workflow applies to a configured WinForms FlexDiagram control.
ChartToPdf sample