Hello
when i try chnage the title of table to hebrew, or when i have any cell with hebrew data i got the following exception
"Couldn't find information about the character. Unicode is not supported by this font"
here is the code that i use
PdfTable table = new PdfTable();
table.Style.CellPadding = 2;
table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
table.Style.HeaderRowCount = 1;
table.Style.ShowHeader = true;
table.Style.BorderPen = new PdfPen(PdfBrushes.LightBlue, 0.5F);
table.Style.DefaultStyle.BackgroundBrush = PdfBrushes.LightYellow;
table.Style.DefaultStyle.Font = new PdfTrueTypeFont(new Font("Arial", 8.5F));
table.DataSource = mydataTable;
table.DataSourceType = PdfTableDataSourceType.TableDirect;
table.Style.HeaderStyle.Font = new PdfTrueTypeFont(new Font("Arial", 11f, FontStyle.Bold));
table.Style.HeaderStyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Center);
table.Style.ShowHeader = true;
foreach (PdfColumn column in table.Columns)
column.StringFormat = new PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle);
this row make exception
table.Columns[0].ColumnName = Properties.Resources.remarks;// hebrew text
PdfTableLayoutFormat tableLayout = new PdfTableLayoutFormat();
tableLayout.Break = PdfLayoutBreakType.FitElement;
tableLayout.Layout = PdfLayoutType.Paginate;
PdfLayoutResult tableDrowResult =table.Draw(page, new PointF(0, 50), tableLayout);
//also i got same exception if any cell on the datatable have hebrew txt
here is my email [email protected]
Exception stack Trace
. at sprἿ.ᜃ(Char A_0) at sprἿ.ᜂ(String A_0) at Spire.Pdf.Graphics.PdfTrueTypeFont.GetLineWidth(String line, PdfStringFormat format) at Spire.Pdf.Graphics.PdfStringLayouter.ᜀ(String A_0) at Spire.Pdf.Graphics.PdfStringLayouter.ᜀ(String A_0, Single A_1) at Spire.Pdf.Graphics.PdfStringLayouter.ᜃ() at Spire.Pdf.Graphics.PdfStringLayouter.Layout(String text, PdfFontBase font, PdfStringFormat format, SizeF size) at spr.ᜀ(PdfLayoutParams A_0, Int32 A_1, String[] A_2, RectangleF A_3, PdfStringLayoutResult[]& A_4, PdfCellStyle A_5) at spr.ᜀ(PdfLayoutParams A_0, Int32& A_1, String[] A_2, RectangleF A_3, Single& A_4, Boolean A_5, Boolean& A_6) at spr.ᜀ(Int32 A_0, PdfLayoutParams A_1, Boolean A_2) at spr.ᜀ(PdfLayoutParams A_0) at sprᜳ.ᜃ(PdfLayoutParams A_0) at Spire.Pdf.Tables.PdfTable.Layout(PdfLayoutParams param) at Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, RectangleF layoutRectangle, PdfTextLayout format) at Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, Single x, Single y, PdfTextLayout format) at Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, PointF location, PdfTextLayout format) at CyberGreenApp.Classes.CreateReports_BL.buildingApprovalUseTable(String contractId) in C:\Work\Cyber Green\EcoProject\App_Web\Classes\CreateReports_BL.cs:line 409 at CyberGreenApp.CreatePDF.DownloadPDF(String docName, String key1, String key2, String key3, String userId) in C:\Work\Cyber Green\EcoProject\App_Web\CreatePDF.aspx.cs:line 68