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

Export to PDF

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • pdf_export.cshtml
  • Pdf_ExportController.cs
  • Customer.cs
  • TagHelper.cshtml

Also available for:

CLIENT-SIDE API SERVER-SIDE API

Description

Nowadays, the PDF format is very popular and widely used to present documents in a manner independent of application software, hardware and operating systems. This demo shows how to export the Telerik for ASP.NET Core Grid contents to PDF.

The approach is very straight-forward - to export the grid content to PDF include the corresponding command to the toolbar of the grid .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, etc. To initiate export programmatically, you can call the saveAsPdf() method from the client-side API.

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

More about Telerik Grid for ASP.NET Core

The demo also demonstrates how a Grid column can be excluded from exporting via the Exportable setting.

Support & Learning Resources