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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDF export ( Unicode is not supported by this font )

Thread ID:

Created:

Updated:

Platform:

Replies:

141340 Dec 6,2018 01:54 PM UTC Dec 7,2018 03:33 PM UTC ASP.NET MVC 1
loading
Tags: Grid
tayfun uyrun
Asked On December 6, 2018 02:01 PM UTC


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?




Vignesh Natarajan [Syncfusion]
Replied On 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 


CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon