The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am facing a problem with positioning the exported grid in the pdf file , I need to set the top margin to 200px for instance , but the exported grid cover the header of the file ,
also I need to set all the columns to be fit in the documents .
exp.Export(obj, DataSource, "Export.pdf", false, false, "flat-saffron", false, false, document, "Grid", false);//here, the 11th parameter is "isAutoFit" which we have set as false.
}
We can fit all the Grid columns in a single page by passing the isAutoFit parameter as false to the export method of the PdfExport Class. By default, the isAutoFit property is true. Please refer to the below code example and sample.
publicvoid ExportToPdf(string GridModel)
{
..
exp.Export(obj, DataSource, "Export.pdf", false, false, "flat-saffron", false, false, document, "Grid", false);//here, the 11th parameter is "isAutoFit" which we have set as false.