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. Image for the cookie policy date
close icon

PDF export ( Unicode is not supported by this font )


Hello there;
I have a stack of data.
No problem getting Excel.
but it gives the following error when transferring pdf.

code:

cshtml:

  @(Html.EJ().Grid<object>("VarlikListele")
              .Datasource(datasource => datasource.Json(ViewBag.Varlik).RemoveURL("VarlikSilJson").Adaptor(AdaptorType.RemoteSaveAdaptor))
              .AllowSorting()
              .AllowPaging()
              .ClientSideEvents(e => e.ActionBegin("actionBegin"))
              .AllowResizeToFit()

              .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.InlineForm); })
              .PageSettings(p => { p.PageSize(15); })
              .AllowSearching()

              .ToolbarSettings(toolbar =>
              {
                  toolbar.ShowToolbar().ToolbarItems(items =>
                  {
                      items.AddTool(ToolBarItems.Search);
                      items.AddTool(ToolBarItems.ExcelExport);
                      items.AddTool(ToolBarItems.PdfExport);
                      items.AddTool(ToolBarItems.PrintGrid);
                      

                  });
              })
              .Mappers(map => map.ExportToExcelAction(Url.Action("ExportToExcel")).ExportToPdfAction(Url.Action("ExportToPdf")).ExportToWordAction(Url.Action("ExportToWord"))
              )
              .Columns(col =>
              {
                  bool Primary = true;
                  foreach (var item in (IEnumerable)ViewBag.Kolon)
                  {
                      if (Primary)
                      {
                          col.Field(item.KolonKod).HeaderText(item.KolonAdi).Template("#SistemID").Width(100).IsPrimaryKey(true).Add();
                          Primary = false;
                      }
                      else
                      {
                          col.Field(item.KolonKod).HeaderText(item.KolonAdi).Add();
                      }
                  }

              }))


controller:

 {
            GridProperties obj = ConvertGridObject(GridModel);
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            //obj.Columns.ForEach(x=>x.Field=StringReplace(x.Field));
            Type test = GetTableType(obj);
            var inst = Array.CreateInstance(test, 1);
            var DataSource = JsonConverter.Deserialize<object>(
                YeniKolonGetir(Session["VarlikID"] as string[], Session["VarlikKolon"] as string[]).Data.ToString());
            string griddata = serializer.Serialize(DataSource);
           // griddata = StringReplace(griddata);
            dynamic data = serializer.Deserialize(griddata, inst.GetType()) as object[];
          
            PdfExport exp = new PdfExport();
            exp.Export(obj, data, "Export.pdf", false, false,true,"flat-saffron");
        }



I added a visual from the stack.
I cleared the Turkish characters from the title and content, but the problem persists.
I tried that code.The result does not change

exp.Export(obj, data, "Export.pdf", false, false,true,"flat-saffron");


result:

will you take a look?




1 Reply

VN Vignesh Natarajan Syncfusion Team December 7, 2018 03:33 PM UTC

Hi tayfun, 

Thanks for using Syncfusion support.  

Query: “PDF export ( Unicode is not supported by this font )” 

From your query, we understand that you are facing issue while exporting the dynamically created list in ejGrid. we have prepared a sample using your code example and we are not able to reproduce the reported issue at our end. 

Kindly download the sample from below link 


If you still face the issue after analyzing the sample, kindly share the following details. 

  1. Share the Full grid rendering code and server side code for exporting
  2. Share the screenshot of exception thrown with full stack trace.
  3. Share the exporting Grid model in the server side (exporting).
  4. If possible try to reproduce the reported issue in provided sample
  5.  Share your essential studio version (XX.X.X.XX)

Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon