[HomeController.cs] public void ExportToPdf(string GridModel) { PdfExport exp = new PdfExport(); List<Person> Persons = new List<Person>(); Persons.Add(new Person() { FirstName = "????", LastName = "Beckett" }); Persons.Add(new Person() { FirstName = "Ben", LastName = "Beckett" }); Persons.Add(new Person() { FirstName = "????", LastName = "????" }); GridProperties obj = ConvertGridObject(GridModel); var DataSource = Persons; obj.ServerPdfQueryCellInfo = QueryCellInfo; exp.Export(obj, DataSource, "Export.pdf", false, false,true, "flat-saffron"); } public void QueryCellInfo(object currentCell) { Syncfusion.Pdf.Grid.PdfGridCell range = (Syncfusion.Pdf.Grid.PdfGridCell)currentCell; range.Style.Font = new PdfTrueTypeFont(new System.Drawing.Font("Arial Unicode MS", 12f), true); } |