# Render to PDF

## Content

Set [C1PdfDocument](/componentone/api/win/online-pdf/dotnet-framework-api/C1.C1Pdf.4.8/C1.C1Pdf.C1PdfDocument.html) as the rendering target to generate PDF output.
The following example renders a FlexChart to a PDF document.

```csharp
using C1.Chart;
using C1.Chart.Standard;
using C1.Pdf;

var chart = new FlexChart();
// Configure the chart.

using (var doc = new C1PdfDocument())
{
    float margin = 72;
    float width = doc.PageSize.Width - 2 * margin;
    float height = (doc.PageSize.Height - 2.5f * margin) / 2;

    chart.Render(doc, margin, margin, width, height);
    doc.Save("Chart.pdf");
}
```

The rectangle passed to `Render` is specified in points.