Fitting Content to Paper Size
Premium

The saveGridPDF method from the @progress/kendo-react-pdf package lets you scale the KendoReact Data Grid content when you export it to PDF.

By default, the Grid size on screen sets the paper size of your PDF. You can pick a specific paper size for the whole document instead. This makes the content scale to fit your chosen paper size. You can also change the scale factor yourself—for example, to add space for other items on the page.

ninja-iconThe PDF Export feature of the Grid is part of KendoReact premium, an enterprise-grade UI library with 120+ free and premium components for building polished, performant apps. Test-drive all features with a free 30-day trial.Start Free Trial
  1. In your Grid definition, set the pdf prop to true to enable exporting to PDF.
  2. Set the paper size with the saveGridPDF method. The method accepts three parameters: the Grid element reference, a configuration object with the paperSize and scale properties, and an optional callback function.
  3. Use the onPdfExport event handler of the Grid to call the saveGridPDF method when the export is triggered.

This example shows how the Grid can fit its content to a predefined A4 paper size:

Change Theme
Theme
Loading ...
In this article
Suggested Links
Not finding the help you need?
Contact Support