New to Telerik UI for ASP.NET Core? Download free 30-day trial

ASP.NET Core Grid PDF Export

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
pdf_export.cshtml
Pdf_ExportController.cs
Customer.cs
Pdf_Export_TagHelper.cshtml

Also available for:

CLIENT-SIDE API HTML HELPER API

Description

The Telerik UI for ASP.NET Core Grid provides a built-in PDF export functionality. The PDF format is very popular and widely used to present documents independently from the application software, hardware, and operating systems.

This demo shows how to export the content of the ASP.NET Core Data Grid to PDF by using a straightforward approach—to export the content of the component to PDF, include the corresponding command to its toolbar by setting .ToolBar(tools => tools.Pdf()). For greater control over the output, configure the PDF export setting. For instance, you can specify the file name and whether to export all pages, margins, paper size, font, and so on. To initiate the PDF export programmatically, call the saveAsPdf() method from the client-side API.

Additionally, you can customize the appearance of the exported Data Grid table by providing a template through the .Pdf(pdf => pdf.TemplateId("page-template")) method.

This demo also demonstrates how to exclude a Grid column from export by configuring the Exportable setting.

For more information about the PDF export capabilities, refer to the official Telerik UI for ASP.NET Core Data Grid product documentation on the available PDF export approaches.

Additional Apps

This Grid example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources