- Home
- Forum
- ASP.NET MVC
- PDF export ( Unicode is not supported by this font )
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?
SIGN IN To post a reply.
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
Sample: http://www.syncfusion.com/downloads/support/forum/141340/ze/SyncfusionMvcApplication40_(3)1590666246
If you still face the issue after analyzing the sample, kindly share the following details.
- Share the Full grid rendering code and server side code for exporting
- Share the screenshot of exception thrown with full stack trace.
- Share the exporting Grid model in the server side (exporting).
- If possible try to reproduce the reported issue in provided sample
- Share your essential studio version (XX.X.X.XX)
Regards,
Vignesh Natarajan
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
TU tayfun uyrun
- Dec 6, 2018 01:54 PM UTC
- Dec 7, 2018 03:33 PM UTC