Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jul 18, 2014 1:07 pm

Couldn't find information about the character. Unicode is not supported by this font.

I'm doing a dump from DataTable into a PDF.

This came from one of your samples and has been working great for weeks:

Code: Select all
           
            table.Style.DefaultStyle.BackgroundBrush = PdfBrushes.SkyBlue
            table.Style.DefaultStyle.Font = New PdfTrueTypeFont(New Font("Arial", 8.0F))
            table.Style.AlternateStyle = New PdfCellStyle()
            table.Style.AlternateStyle.BackgroundBrush = PdfBrushes.White
            table.Style.AlternateStyle.Font = New PdfTrueTypeFont(New Font("Arial", 8.0F))
            table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions
            table.Style.HeaderStyle.BackgroundBrush = PdfBrushes.White
            table.Style.HeaderStyle.Font = New PdfTrueTypeFont(New Font("Arial", 9.0F, FontStyle.Bold))
            table.Style.HeaderStyle.StringFormat = New PdfStringFormat(PdfTextAlignment.Center)


Now I get the error above. Unfortunately the error gives no indication what the character is which would be helpful.

I found this page:
Code: Select all
www.e-iceblue.com/forum/error-converting-xls-to-pdf-t3969.html


settings.EmbedFonts = true;

Is there an equivalent way to do this for PDFTable?

Alternatively is there another font that you can recommend to get around this or another recommendation?

I have no idea what the other character may be. I suspect it may be something from a Norwegian alphabet but I can't be sure as no "strange" characters show up in an asp view of the same data.

Everything else has been working fine for a couple of weeks. Some new piece of data picked up by this functionality in the past few hours has caused this.

Thanks in advance

bagadonitz
 
Posts: 4
Joined: Fri Jul 04, 2014 6:11 pm

Fri Jul 18, 2014 1:13 pm

Full trace incase it helps:

Code: Select all
[PdfException: Couldn't find information about the character. Unicode is not supported by this font.]
   sprἼ.ᜃ(Char A_0) +257
   sprἼ.ᜂ(String A_0) +69
   Spire.Pdf.Graphics.PdfTrueTypeFont.GetLineWidth(String line, PdfStringFormat format) +115
   Spire.Pdf.Graphics.PdfStringLayouter.ᜀ(String A_0) +19
   Spire.Pdf.Graphics.PdfStringLayouter.ᜀ(String A_0, Single A_1) +570
   Spire.Pdf.Graphics.PdfStringLayouter.ᜃ() +273
   Spire.Pdf.Graphics.PdfStringLayouter.Layout(String text, PdfFontBase font, PdfStringFormat format, SizeF size) +43
   spr᫵.ᜀ(PdfLayoutParams A_0, Int32 A_1, String[] A_2, RectangleF A_3, PdfStringLayoutResult[]& A_4, PdfCellStyle A_5) +885
   spr᫵.ᜀ(PdfLayoutParams A_0, Int32& A_1, String[] A_2, RectangleF A_3, Single& A_4, Boolean A_5, Boolean& A_6) +1824
   spr᫵.ᜀ(Int32 A_0, PdfLayoutParams A_1, Boolean A_2) +1179
   spr᫵.ᜀ(PdfLayoutParams A_0) +965
   sprᜳ.ᜃ(PdfLayoutParams A_0) +15
   Spire.Pdf.Tables.PdfTable.Layout(PdfLayoutParams param) +84
   Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, RectangleF layoutRectangle, PdfTextLayout format) +149
   Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, Single x, Single y, PdfTextLayout format) +45
   Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, Single x, Single y) +15
   Spire.Pdf.Graphics.PdfLayoutWidget.Draw(PdfPageBase page, PointF location) +13
   POB.POB_Graphical.PrintSnapShot() in C:\Repositories\POB\POB\POB_Graphical.aspx.vb:499
   POB.POB_Graphical.POBMap_Clicked(Object sender, ImageMapEventArgs e) in C:\Repositories\POB\POB\POB_Graphical.aspx.vb:324
   System.Web.UI.WebControls.ImageMap.OnClick(ImageMapEventArgs e) +111
   System.Web.UI.WebControls.ImageMap.RaisePostBackEvent(String eventArgument) +222
   System.Web.UI.WebControls.ImageMap.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9528578
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

bagadonitz
 
Posts: 4
Joined: Fri Jul 04, 2014 6:11 pm

Fri Jul 18, 2014 3:22 pm

I identified the character. It was a plain old hyphen ( - ) in one of the columns.

The piece of data was:

Electrician - LOTO

Removing the Hyphen makes the error go away.

I'm still interested on hearing a way, if any, to prevent this from happening with other non standard characters for Arial.

bagadonitz
 
Posts: 4
Joined: Fri Jul 04, 2014 6:11 pm

Mon Jul 21, 2014 8:13 am

Hello,

Sorry for late reply as weekend.
Thanks for your feedback. We have tested the Hyphen character in PdfTable(see screenshot), but there is no the error you mentioned, To help us reproduce it, please provide us your codes or datas for testing.
Thanks,
Gary
E-iceblue support team
Image
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Jul 23, 2014 10:07 am

Hello,

Could you provide us your codes and datas for testing?

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Sep 02, 2014 6:02 pm

The code was exactly as per the example listed on your site.

http://www.e-iceblue.com/Knowledgebase/ ... B.NET.html

The data in my case, as shown above, is a simple varchar from an MSSQL database.

bagadonitz
 
Posts: 4
Joined: Fri Jul 04, 2014 6:11 pm

Wed Sep 03, 2014 6:29 am

Hello,

Thanks for your response.
Please download the newest hotfix of Spire.Pdf(Spire.PDF Pack(Hot Fix) Version:3.1.24) and try it, if the issue still arises, please export your data to Excel, then send it to us for testing.
BTW, what's your operation system?
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Sep 09, 2014 9:09 am

Hello,

Has the issue been resolved? Could you please give us some feedback if convenience? If not, please provide us your data, which will be helpful to reproduce the issue and work out the solution for you ASAP.
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Feb 24, 2016 4:03 am

Hi have the same issue. I for the hot fix but still same result.

Couldn't find information about the character. Unicode is not supported by this font.

Thanks,
C

cesar.perez72@gmail.com
 
Posts: 1
Joined: Wed Feb 24, 2016 3:13 am

Wed Feb 24, 2016 5:38 am

Hi,

Thanks for your posting.
To help us investigate the issue and resolve it soon, please share your project. You can also send it to amy.zhao@e-iceblue.com.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Jul 08, 2016 2:52 pm

I also get this error - I run the sample ImageTable, but change the data so that it contains a Euro symbol (€), then I get the error :
Couldn't find information about the character. Unicode is not supported by this font.

How do I change the fonts in a table so that I can display the Euro symbol?

Note this was using the Free version spire.pdf-fe_3.2

pkerrpcit
 
Posts: 1
Joined: Thu Jul 07, 2016 10:03 am

Mon Jul 11, 2016 6:56 am

Hi,

Thanks for your inquiry.
I have tested your scenario with latest Spire.PDF Pack(Hot Fix) Version:3.7.106. There is no exception, but I found € is not displyed correctly, I have posted this issue to our Dev team, we will inform you once there is any progress.


Sincerely,
Betsy
E-iceblue support team
Last edited by Betsy on Mon Jul 11, 2016 8:44 am, edited 1 time in total.
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Jul 11, 2016 8:44 am

Hi,

Please try to use the method PdfTrueTypeFont(Font font, bool unicode) to create a font, and use the version I mentioned, it works fine, the Euro symbol (€) can be displayed correctly.

Code: Select all
             //create data table
            PdfTable table = new PdfTable();
            table.Style.CellPadding = 2;
            table.Style.BorderPen = new PdfPen(brush1, 0.75f);
            table.Style.DefaultStyle.BackgroundBrush = PdfBrushes.SkyBlue;
            table.Style.DefaultStyle.Font = new PdfTrueTypeFont(new Font("Arial", 10f),true);
            table.Style.AlternateStyle = new PdfCellStyle();
            table.Style.AlternateStyle.BackgroundBrush = PdfBrushes.LightYellow;
            table.Style.AlternateStyle.Font = new PdfTrueTypeFont(new Font("Arial", 10f), true);
            table.Style.HeaderSource = PdfHeaderSource.ColumnCaptions;
            table.Style.HeaderStyle.BackgroundBrush = PdfBrushes.CadetBlue;
            table.Style.HeaderStyle.Font = new PdfTrueTypeFont(new Font("Arial", 11f, FontStyle.Bold), true);
            table.Style.HeaderStyle.StringFormat = new PdfStringFormat(PdfTextAlignment.Center);
            table.Style.ShowHeader = true;


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.PDF