We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ejGrid export to pdf,but chinese character is empty character.

Thread ID:





125727 Sep 7,2016 07:39 AM UTC Sep 15,2016 12:16 PM UTC JavaScript 1
Tags: ejGrid
Asked On September 7, 2016 07:39 AM UTC

GridProperties obj = ConvertGridObject(gridModel);
            PdfExport exp = new PdfExport();
            IList<Notice> noticeList = new List<Notice>();
            noticeList.Add(new Notice()
                NoticeTitle = "阿斯蒂芬",
                NoticeType = "teast"
            noticeList.Add(new Notice()
                NoticeTitle = "test2",
                NoticeType = "asdf"
            IEnumerable<Notice> result = noticeList;
            exp.Export(obj, result, "Export.pdf"falsefalsetrue"flat-saffron");

Thank you!

Mani Sankar Durai [Syncfusion]
Replied On September 15, 2016 12:16 PM UTC

Hi tmzl, 

 We are sorry for the late response. 

We have analyzed your query and achieved your requirement by using ServerPdfQueryCellInfo of Exporting server events. We have changed the font name as “Arial Unicode MS” to show the Chinese character while exporting into PDF. 
Please refer the below code example, 
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); 
Before exporting into PDF the QueryCellInfo will get triggered to change and access the particular cell information. 
We have also prepared a sample that can be downloaded from the below link, 
Also please refer the documentation of how we can Export Server events 
Please let us know if you need further assistance. 
Manisankar Durai. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon