[Bug Report] CR4E V2: Exported PDF displays Japanese characters incorrectly

We now plan to transport a legacy application from VB to Java with Crystal Reports for Eclipse. It is required to export report as PDF file, but result PDFs display Japanese characters incorrectly for field with some mostly used Japanese fonts (MS Gothic & Mincho).
Here is our sample Crystal Reports project:   [download related resources here|http://sites.google.com/site/cr4eexportpdf/example-of-cr4e-export-pdf]
1. PDFExportSample.rpt located under ..\src contains fields with different Japanese fonts.
2. Run SampleViewerFrameClient#main(..) to open a Java Report Viewer:
    a) At zoom rate 100%, everything is ok.
    b) Change zoom rate to 200% or 50%, some fields in Japanese font collapse.
    c) Export to PDF file,
         * Fonts "MS Gothic & Mincho": both ASCII & Japanese characters failed.
         * Fonts "Meiryo & HGKyokashotai": everything works well.
         * Open PDF properties, you will see all fonts are embedded with built-in encoding.
         * Interest to note that copy collapsed Japanese characters from Acrobat Reader, then
           paste them into a Notepad window, Notepad will show the correct Japanese characters anyway.
           It seems PDF export in CR4E mistaking to choose right typeface for Japanese characters
           from some TTF file.
3. Open PDFExportSample.rpt in Crystal Report 2008 Designer (trial version), and export it as PDF.
    The result PDF displays both ASCII & Japanese characters without any problem.
Test environment as below:
* Windows XP Professional SP3 (Japanese) with MS Office which including extra fonts (i.e. HGKyokashotai)
* Font version: MS Gothic, Mincho, Meiryo, all in Version 5.0
    You can download MS Meiryo from Microsoft's Site:
    http://www.microsoft.com/downloads/details.aspx?familyid=F7D758D2-46FF-4C55-92F2-69AE834AC928&displaylang=en)
* Eclipse 3.5.2
* Crystal Reports for Eclipse, V2, 12.2.207.r916
Can this problem be fixed? If yes how long will it take to release a patch?
We really looking forward to a solution before abandoning CR4E.
Thanks for any reply.

I have created a [simple PDF file|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/simple.pdf?attredirects=0&d=1] exported from CR4E. It is expected to display "漢字" (or in unicode as "\u6F22\u5B57"), but instead being rendered in different ones of "殱塸" (in unicode as "\u6BB1\u5878").
Look inside into this simple PDF file (you can just open it with your favorite text editor), here is its page content:
8 0 obj
<</Filter [ /FlateDecode ] /Length 120>>
stream ... endstream
endobj
Decode this stream, we get:
/DeviceRGB cs
/DeviceRGB CS
q
1 0 0 1 0 841.7 cm
13 -13 569.2 -815.7  re W n
BT
1 0 0 1 25.75 -105.6 Tm     <-- text position
0 Tr
/ttf0 10 Tf                 <-- apply font
0 0 0 sc
( !)Tj                      <-- show glyphs [20, 21], which index is to embedded TrueType font subset
ET
Q
The only embeded font subset is defined as:
9 0 obj /ttf0 endobj
10 0 obj /AAAAAA+MSGothic endobj
11 0 obj
<< /BaseFont /AAAAAA+MSGothic
/FirstChar 32
/FontDescriptor 13 0 R
/LastChar 33
/Subtype /TrueType
/ToUnicode 18 0 R                            <-- point to a CMap object
/Type /Font
/Widths 17 0 R >>
endobj
12 0 obj [ 0 -140 1000 859 ] endobj
13 0 obj
<< /Ascent 860
/CapHeight 1001
/Descent -141
/Flags 4
/FontBBox 12 0 R
/FontFile2 14 0 R                            <-- point to an embedded TrueType font subset
/FontName /AAAAAA+MSGothic
/ItalicAngle 0
/MissingWidth 1000
/StemV 0
/Type /FontDescriptor >>
endobj
The CMap object after decoded is:
18 0 obj
/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<
/Registry (AAAAAB+MSGothic) /Ordering (UCS) /Supplement 0 >> def
/CMapName /AAAAAB+MSGothic def
1 begincodespacerange <20> <21> endcodespacerange
2 beginbfrange
<20> <20> <6f22>                         <-- "u6F22"
<21> <21> <5b57>                         <-- "u5B57"
endbfrange
endcmap CMapName currentdict /CMap defineresource pop end end
endobj
I can write out the embedded TrueType font subset (= "14 0 obj") to a file named "[embedded.ttc|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/embedded.ttf?attredirects=0&d=1]", which is really a tiny TrueType font file containing only the wrong typefaces for "漢" & "字". It seems everything OK except CR4E failed to choose right typefaces from the TrueType file (msgothic.ttc).
Is it any help? I am looking forward to any solution.

Similar Messages

  • Re:How to display Japanese Characters

    Dear all
    Does any one has idea how to display Japanese characters in PDF output generated by the Reports6i.
    Reports in Discoverer are working fine but when it comes to pdf the Japanese Characters are lost.

    Hi Rohit
    Thanks for prompt reply.
    1) Suppose if we upgrade the Report6i By applying the Latest patch.
    2)Then Develop the reports in 9i editor and run it on live enviornment which is Oracle9iAs (Application server)
    , Reports6i server(patch 14) will it still loss the effects/Can cause problems Later on.
    Thanks
    Jai

  • [Solved] URXVT cannot display Japanese Characters

    Solved:
    I had a typo in my locale.conf, setting to an invalid locale - apparently that did it.
    Thanks for the help!
    Hi everybody!
    I just now re-installed Arch because I switched hard-drives (to an SSD) and everything seems to be working again, apart from one thing:
    urxvt doesn't display Japanese Characters, just questionmarks instead when using ls and garbage characters otherwise.
    I literally copied and pasted my ~/.Xresources from my old install, so I'm not quite sure what went wrong.
    This is said file:
    Urxvt.urgentOnBell: True
    urxvt*cursorBlink: false
    !urxvt*internalBorder: 0
    !urxvt*externalBorder: 0
    URxvt*.depth: 32
    URxvt*.background: [85]#000000
    ! URxvt.scrollstyle: plain
    URxvt.scrollBar: false
    URxvt.foreground: grey
    ! red
    URxvt.color1: #CC0000
    URxvt.color9: #B33838
    ! blue
    URxvt.color4: #3465A4
    URxvt.color12: #729FCF
    ! yellow
    Urxvt.color3: #b48363
    URxvt.color11: #d49b4e
    !URxvt.font: 8x13
    urxvt*font: xft:DejaVu Sans Mono:size=8:antialas=true,xft:Kochi Gothic:size=8
    This is what fc-list has to say:
    % fc-list | grep "Kochi\|DejaVuSansMono"
    /usr/share/fonts/TTF/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
    /usr/share/fonts/TTF/kochi-mincho-subst.ttf: Kochi Mincho,æ±é¢¨ææ:style=Regular,æ¨æº
    /usr/share/fonts/TTF/kochi-gothic-subst.ttf: Kochi Gothic,æ±é¢¨ã´ã·ãã¯:style=Regular,æ¨æº
    /usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
    /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
    /usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans Mono:style=Bold Oblique
    I already tried re-installing the fonts and I also tried out alternative fonts, but nothing seems to work.
    All the other settings from the ~/.Xresources file are applied perfectly, so I'm not quite sure where to look for the error.
    My browser (dwb) displays japanese characters just fine.
    Any help is greatly appreciated
    Edit: I just realized that urxvt seems to completely ignore the fonts line - I had that problem once before, when I used the AMD Catalyst driver and not the open source one.
    I now have an Nvidia card and started using the propietary driver - maybe that has something to do with it?
    Last edited by lorizean (2013-12-02 13:16:14)

    Works here:
    URxvt*depth: 32
    URxvt*buffered: true
    URxvt*termName: rxvt-256color
    URxvt.font: xft:Terminus:pixelsize=12:antialias=false
    urxvt.imLocale: pl_PL.ISO8859-2
    What's the output of 'localectl'?

  • Problem in displaying Japanese characters on the browser.

    Hi Friends,
    Hope one of you could help me in this!!
    We are using SHIFT_JIS character encoding in our jsps to display Japanese characters.
    <%@ page contentType="text/html; charset=SHIFT_JIS" %>
    Is there any other configuration required on server side to let the Japanese characters being displayed? Because what I am getting on screen is quite annoying. Well something like below.
    ?V?M???????�
    Even though my knowledge in Japs isn't too good :-)) I can understand that these are not Japanese. I believe I am missing something in terms of server side configuration, Can anybody point that out. (Maybe some of the Japanese developers in here).
    This could not be a client side issue, since from the same machine I can access other Japanese sites and they display properly. Let me know if anybody can help.
    I am running these in WAS 5.0
    Thanks,
    King

    Your text in the JSP should be UTF-8 nevertheless - as would be ideal
    for internationalization. Java comes with a command-line conversion tool
    native2ascii which is bidirectional.
    As non-Japanese I am not certain whether "SJIS" might not be better (there
    are some name variations in java).
    The HTML generation will translate these characters to SHIFT_JIS in your case.
    Where the target encoding cannot handle the intended character it receives a
    question mark - hat you saw.
    Furthermore you need a proper font in HTML and under Windows (window title).
    Your webserver should have east-asian support. Though Japanese (and English)
    are standard, I, as non-japanese am not certain about SHIFT_JIS.
    Also there is some freedom in choice for a japanese encoding.

  • ITunes not displaying Japanese characters...

    Ever since a few days ago, iTunes stopped displaying Japanese characters for any of the songs that have them. They display right on the iPod and on my computer, and even if I re-type them, they continue being boxes. But if I copy and paste a section of cubes and paste it into Google Chrome or anything else, they show up just fine...
    Is there any way to fix that?
    Thanks~

    Have a look at Tome Gewecke's User Tip and let us know if it provides any helpful information for you.

  • Charcterset to display Japanese characters

    I am using Oracle 8i
    Database (server) characterset & ncharcharcterset is utf8.
    What value i have to set in Client to display Japanese characters?

    Hello,
    I had the same problem as you have:
    Loading japanese and chinese data
    two steps are necessary:
    1) On XP: Control Panel->Regional and Language Options->Languages tab: aktivate
    "install files for ost asian languages" (you need the winxp install cd!!!)
    2) Run your select statement from SQL*Plus, iSQL*Plus or SQLDeveloper
    Sincerely,
    Christian

  • Display Japanese characters on Applet

    Hi All,
    I am able to display Japanese Characters on my Applet locally(Windows 2000 - US) by overwriting the font.properties content with the one in font.properties.ja found in JRE/LIB directory of my Jdeveloper JDK. When I deploy the applet on 9ias server which is configured for UTF8 charset I get squares wherever I have Japanese characters.
    Appreciate if someone could tell the procedures to make the applet to recognize the Japanese/UTF8 characters and display accordingly.

    I have read some documentation on JDBC thin drivers and they have mentioned that whenever JDBC retreives data from a database it converts it to Unicode 1.2 and I am already retreiving data from a UTF 8 database. The reason I think this is true is because I can display japanese characters locally on my windows machine by overwriting the font.properties in the JDevelopers- JDK- JRE - LIB folder by font.properties.ja
    There must be some way to test why it is showing squares for japanese characters when I deploy it on the server. May be not getting the MS Gothic font used to display Japanese?
    Looks like updating all the code is not feasible at this point as the code currently stores the data in Vectors and we can't perform a vector.getBytes(). Any help will be really appreciated.

  • Displaying Japanese characters in JSP page

    Hi,
    I am calling an application which returns Japanese characters from my JSP. I am getting the captions in Japanese characters from the application and I am able to display the Japanese captions. After displaying the Japanese captions, user will select the particular captions by selecting the check box against the caption and Press Save button. Then I am storing the captions in the javascript string separated by :: and passing it to another JSP.
    The acton JSP retrieves that string and split it by using tokenizer and store it in the database. When I retrieve it again from the database and display it, I am not able to see the Japanese characters, it is showing some other characters, may be characters encoded by ISO.
    My database is UTF-8 enabled and in my server I am setting the UTF-8 as default encoding. In my JSP pages also, I am setting the charset and encoding type as UTF-8.
    I shall appreciate you if you can help me in resolving the issue.

    Post the encoding-related statements from your JSPs - there are a number of different ones that may be relevant.
    It may also be relevant which database you store the strings in (Oracle, DB2, etc.), since some require an encoding parameter to be passed.

  • Problem in displaying Japanese characters in SAPScripts

    Hi All,
    I am facing a strange problem in one of my SAPScripts. I have one script in both English and Japanese languages. The scripts are already existing. I had to do some minor changes in a logo window. I did them and i did not do any other changes in any of the windows.
    When the output wa s seen for the script in the Japanese version, it was looking ok displaying all hte Japanese characters in various windows. Now, during testing , in the same server, the Japanese characteres are not shown. Instead , some ' #'(hash) symb ols are getting displayed.
    How could it happen? Did any body face such problem? If so, can anybody plz help me out with the solution?
    What shud i do to get back the Japanese characters in my script again?
    Regards,
    Priya

    Priya.
    this is not an ABAP problem ask your BASIS team to set printer cofing from SPAD.dont worry its not an ABAP issue at all.
    sometime printer doesnt support special char so it need to be setting with printer.
    Amit.

  • Titlebar on Solaris does not display Japanese characters

    I have a Java Swing application (running on 1.6.0_06) that sets Japanese characters on the titlebar of Dialogs. The Japanese characters display correctly when the application runs on Windows but displays as ? when run under Solaris.
    Details of the Solaris environment:
    Japanese Solaris (UTF-8 encoding)
    Japanese locale (ja_JP)
    Using an X server that has the required font support (because Japanese characters display correctly everywhere except in the titlebar)
    Using CDE as the session manager (and I think dtwn is the window manager used by CDE)
    The funny thing is that the Japanese characters display correctly when I use the JDE session manager instead of CDE, so the problem exists only with CDE and the Open Look interface as well. I tried setting the required resources for WMShell too but that didn't work.
    I seem to be missing some CDE configuration somewhere as the window manager is not able to figure out that the title is non-C locale.
    Any pointers or help in this regard would be appreciated.

    You're probably viewing the website in the wrong character set.
    Try View > Character Encoding > some Japanese encodings, or UTF8 or 16
    The website itself should specify the encoding. The default encoding - in Options > Content - is only used if the website doesn't specify an encoding. Maybe the website you're looking at specifies the wrong encoding.

  • Displaying Japanese characters on JSP.

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=SJIS">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    </HEAD>
    <BODY>
    <%
       String userID = myServer.getUserID() ;
       System.out.println("testing : "+userID) ;
    %>
    <%= userID %>
    </BODY>
    </HTML>=======================================
    Above is my code. I am able to print out the japanese characters at the command prompt using the system.out.println().
    But when I output the value to the jsp page using
    <%= userID %>, it becomes "???????"
    Some one please explain to me what went wrong ?
    Please help.
    Thank you.

    Hi,
    In our JSP page we have included
    <%@ page contentType="text/html; charset=SJIS" %>
    at the top of the JSP Page. This enables the Japanese Strings to be displayed correctly on the page after beiing picked from the Resource Bundle.
    Also just below the Head Tag we have included
    <meta http-equiv="Content-Type" content="text/html; charset=shift-JIS">
    This enables the Japanese data to be retrieved from the database as well as set the data successfully in the database if the upper Tag
    <%@ page contentType="text/html; charset=SJIS" %>
    is specified then the strings from the database are displayes as a series of ????????? , Now what we are looking for is a solution to get both the things right that is getting and setting the strings from the database as japanese and getting the strings from the Resource bundles as japanese .
    We have also tried the tomcat Web server , but it is of no use as we have found ourselves right where we had started .
    Earliest response will be deeply appreciated
    Regards

  • Can display Japanese characters but can't save to db properly

    Hello! I'm having quite a predicament here! When getting Japanese characters in the database(characters are as-is), it successfully displays them. I manually put it in the database. But when I try to save to the database using the browser(textfields, submits, connections, etc), it saves as garbage.
    Here's the code on my first page. It only gets user input then submits to another jsp
    <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
    <jsp:useBean id="helper" class="com.ats.equipc.DBHelper" scope="request" />
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
         <form name="formOne" action="testOut.jsp">
              in1:  <input type="text" name="in1" />
              <br>
              <input type="submit" value="submit" />
         </form>
         <%! ResultSet rs = null; %>
         <% rs = helper.doGetQuery("select * from t_test;");
              while(rs.next()) {
                   out.print(rs.getString(1) + "<br>");
         %>
    </body>
    </html>Don't mind the Resultset, I just put it there so I can see the saves.
    My second page. This is where I save the entry
    <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <jsp:useBean id="helper" class="com.ats.equipc.DBHelper" scope="request"/>
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
         <%! ResultSet rs = null; %>
         <% request.setCharacterEncoding("utf-8");
              String entry = request.getParameter("in1");
              out.println(entry);
         %>
         <% helper.doSaveQuery("insert into t_test values('" + entry + "');"); %>
    </body>
    </html>Help please...

    Thanks once again for replying
    I got it to work but its still foggy to me why it does work.
    I replaced the code
    <%! ResultSet rs = null; %>
         <% request.setCharacterEncoding("utf-8");
              String entry = request.getParameter("in1");
              out.println(entry);
         %>with this
    <%! ResultSet rs = null; %>
         <% //request.setCharacterEncoding("utf-8");
              String entry = new String(request.getParameter("in1").getBytes("iso-8859-1"), "utf-8");
              out.println(entry);
         %>Take a look at:
    String entry = new String(request.getParameter("in1").getBytes("iso-8859-1"), "utf-8");Why do I need to specify the charset to "iso-8859-1" when getting the bytes then making it "utf-8" when finally making it into a string?

  • Display japanese characters - beginner

    I'n beginner in i18n. I read documentation about i18n but I have problems.
    I'm trying to read japanese characters from a file and and diplay them in a label or text area, but I cannot. The file is OK. If I open it with MsWord the fonts are recognized(encoding Japanese Shift JIS -> font MS Gothic).
    Are there some settings I should do ? (font.properties file or any other settings for java). I just install japanesse font and THAT'S ALL.
    I have win98 and j2sdk1.4.
    Here is what I do :
    label.setFont(new Font("MS Gothic",Font.PLAIN,20));
    BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("myfile.txt")));     
    String text=br.readLine();
    label.setText(text);
    A sample code will be nice.
    Thank you,
    Cata

    I SOLVE THE PROBLEM.
    BufferedReader dis = new BufferedReader(new InputStreamReader( urlConn.getInputStream(),"SJIS"));     
    "SJIS" - was the key

  • Bug Report: Original image location sometimes displayed in PDF created with Word 2013

    I found a non-critical security bug in Office 2013.
    Here is the issue:
    If you drag and drop an image into Word 2013 (I'm using x64 version in Windows 7 if that matters) and then save as PDF (using the default settings) it saves the full file path of the original file in the PDF such that the full path name gets displayed when
    you hover over the image. I've only tested this in Adobe Reader XI. If you use the Insert Picture method then this does not occur.

    I found this posting as I have now "rediscovered" this issue. I came to the same conclusion - edit ALT TEXT for every image.
    However, I think it is confusing that these paths of image file are not considered Personal Information that can be removed using the Inspect Document feature (I tried - was not successful). The list of things to be removed using this wizard is quite extensive
    - and some of them less visible than these file paths.
    It would be interesting to know if this is going to change with future updates of Word. Why is an ALT TEXT included at all per default? I think using the file path in ALT TEXT should be made optional. Is there a way to turn off this default embedding of
    the full path?
    As the OP I also used Office 2013 on Windows 7 64bit.
    Elke

  • Crystal Report Xi to export PDF 1.4

    Post Author: yxh
    CA Forum: Exporting
    hello:
    We are using Crystal XI, which exports reprot to PDF 1.3. We'll need the PDF report vto be in version 1.4 (not version 1.5) in order to meet FDA submission requirement. Can this be doen with Crystal Report XI, such as install a patch?
    Thanks,

    Do you mean in Adobe Reader when you open the PDF?
    You can set the default zoom level tobe used when a file is opened in Adobe but it will need to be set on a per client basis. I think by default it is set to Auto Zoom based on document:
    In Adobe Reader click on Edit, Preferences, Page Display, Default Page Layout and Zoom, click the Zoom drop down and change it to the optimum zoom for your report.
    Export the report to application PDF, the report should open in a PDF using the zoom level you specified.
    Not quite sure if this is what you are after?

Maybe you are looking for