Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.97 KB

add-charts-to-pdf-radpdfprocessing.md

File metadata and controls

47 lines (31 loc) · 2.97 KB
title description type page_title slug tags res_type ticketid
Adding Charts to a PDF Document in RadPdfProcessing
Learn how to insert charts into a PDF document using RadPdfProcessing.
how-to
How to Include Charts in PDF Files with RadPdfProcessing
add-charts-to-pdf-radpdfprocessing
pdfprocessing, document, processing, chart, pdf, image, export
kb
1679135

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]({%slug radpdfprocessing-overview%}).

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:

  • Using FixedContentEditor as detailed in [How to Generate a PDF Document from Images with FixedContentEditor]({%slug pdf-from-images-with-fixedcontenteditor%}).

  • Utilizing RadFixedDocumentEditor as outlined in [How to Generate a PDF Document from Images with RadFixedDocumentEditor]({%slug pdf-from-images-with-radfixeddocumenteditor%}).

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