New to Telerik Document Processing? Download free 30-day trial

Adding Charts to a PDF Document in RadPdfProcessing

Environment

Version Product Author
2025.1.205 (2025 Q1) RadPdfProcessing Desislava Yordanova

Description

This article shows how to programmatically generate a Chart and embed it into a PDF file using RadPdfProcessing.

Solution

RadPdfProcessing doesn't provide functionality for generating chart elements inside the PDF document. However, the chart can be generated by the appropriate UI control and export it as an image which can be later inserted in the document.

To embed a chart into a PDF document using RadPdfProcessing, follow these steps:

1. Export the Chart as an Image: First, generate the chart you want to include in your PDF with the appropriate UI control offered by the Telerik family and convert it an image format.

  • For .NET Standard scenario, it is suitable to use the Telerik UI for Blazor Chart, and utilize the Export Chart as Image feature. Refer to forum post for detailed instructions.

  • For .NET Framework scenario, it is suitable to use the Telerik UI for WinForms ChartView, and utilize its Export to image functionality.

2. Insert the Image into the PDF: After obtaining the image of your chart, use RadPdfProcessing to insert this image into your PDF document. RadPdfProcessing offers two approaches for working with images in PDFs:

Choose the approach that best suits your needs. Both methods will allow you to insert and scale the image (chart) as needed within your PDF document.

See Also

In this article