How to fit all columns in single page for PDF exporting

This knowledge base explains how to fit all columns in a single page for PDF exporting

Solution:

While exporting the Grid, columns width is based on its content. By default, it is not feasible to fit n number of columns in a single page of PDF document. But we can afford some more number of columns by rendering the Grid columns based on column width. We can achieve this by defining the isAutoFit as false and setting the PdfPageOrientation as landscape.

The Grid initialization as follows.

HTML

JS

MVC

ASP

CORE

Angular

TS

Handling server-side for PDF exporting

ASP

MVC

Core

Note:

If we have more columns which is not fit into A4 size landscape mode, then we can change the size of pageSettings as you want.