UTF-8 In Reports

8 posts, 0 answers
  1. Nick Devore
    Nick Devore avatar
    9 posts
    Member since:
    Mar 2006

    Posted 26 Apr 2007 Link to this post

    I've got some Traditional Chinese characters stored in a NTEXT field in our Sql Server 2000 machine.  When I pull it from the db and stick it into a field in a report, it looks fine in the Web Report Viewer.  When I export to PDF, the characters are just the empty boxes.  I have the Asian fonts installed on my machine, so I'm suspecting it has something to do with the Encoding parameter of the Render function for the ReportProcessor.  If that is true, what encoding parameter do I pass in?

    (In case you can't guess, I'm new to generating unicode stuff ;) )
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Apr 2007 Link to this post

    Hello Nick,

    Can you tell us the name of the Font that you are using (or send it to us if it is free to use, i.e. not copyrighted) so that we can try to reproduce your case. Also, a little sample excerpt form the Traditional Chinese text will help us a lot.

    Meanwhile, can you try the following. There is font called Arial Unicode that has all possible Unicode ranges. You can install it on your system following the instructions at the bottom of this page: http://support.microsoft.com/kb/287247

    Try setting the Font of the TextBoxes that contain the Traditional Chinese characters to ArialUnicode and see whether the PDF shows up right.

    P.S. The Encoding parameter of the Render function is an out parameter and has nothing to do with the Fonts in PDF.

    Sincerely yours,
    Rossen
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. Nick Devore
    Nick Devore avatar
    9 posts
    Member since:
    Mar 2006

    Posted 30 Apr 2007 Link to this post

    I am using just plain ol' Arial that comes installed on the machine.  The Chinese string I'm displaying is just copied from a news article on tw.yahoo.com and it begins like this:

    在無重力、沒有氧氣的太空裡,太空人一定要靠著太空衣保護才能保命,不過美國太空總署
    (string above displays Chinese characters on my machine in this box but I have the Asian fonts installed)

    I will try the Arial Unicode and see where that gets me.
  5. Nick Devore
    Nick Devore avatar
    9 posts
    Member since:
    Mar 2006

    Posted 30 Apr 2007 Link to this post

    I installed the Universal Arial font.  It displayed correctly in the browser Report Viewer, but when I exported to PDF, the PDF showed empty boxes.
  6. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 02 May 2007 Link to this post

    Hi Nick,

    Can you send us the actual Report file (source code) and the PDF file, so that we can take a look "inside" and try to determine the cause for the problem. We will try to reproduce it over here. Another important question is what is the size of your PDF in megabytes?

    Also, tell us the exact version of the Adobe Reader that you use to view the PDF. On our machines, with Adobe Reader 6.0 we see the Chinese text that you sent us perfectly by using the Arial Unicode MS Font.

    I am attaching the report that we tested with. It is very simple and unbound -- only one TextBox with font Arial Unicode MS in the report header. You can give it a try on your machine and see what happens. Try all formats -- HTML, Image, PDF and tell us the results.

    Kind regards,
    Rossen
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Roman
    Roman avatar
    13 posts
    Member since:
    Apr 2011

    Posted 09 Nov 2012 Link to this post

    We have this exact same problem.  Our report uses only Arial Unicode MS.  Exports to Microsoft Excel work fine (the East Asian text is visible).  However, exports to PDF result in empty boxes instead of text.

    I should add that PDFs created on my development machine work fine.  But when we deploy to our server (Windows Server 2008 Standard), the PDFs once again result in empty boxes.

    Any suggestions?


  8. Aron
    Aron avatar
    80 posts
    Member since:
    Dec 2005

    Posted 23 Jan 2013 Link to this post

    Hello,
    I'm having the same issue with Thai Characters.
    Works fine in Web Viewer, but I just get blank / or corrupt (boxes) text areas in the PDF export.
    Also using plain Arial font.
  9. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 23 Jan 2013 Link to this post

    Hello guys,

    @Roman: you should install Arial Unicode MS font on your server and restart it.

    @Aron: plain Arial font does not contain Thai scripts, thus there are no such characters to be embedded in the PDF. You should use a font that supports Thai characters, such as Arial Unicode MS.

    Kind regards,
    Steve
    the Telerik team

    HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

Back to Top
DevCraft banner