ASP.NET Chart Demos / Export to PDF


This example demonstrates how to export multiple charts into a single pdf file.

First you need to save the exported as an image charts into the hidden fields. Then on server side you can convert the images' base 64 strings to byte arrays and generate images. Then they can be embeded into the PDF document. As a .NET library for processing PDF you can use PDFsharp - the Open Source library that easily creates PDF documents from any .NET language.

Note: The charts will be scaled to fit the PDF document and their dimensions will be taken when they are rendered on the page for the first time. Reloading the page on a smaller resolution will end up exporting charts that are more readable.

Was this example useful?