missing Vietnamese alphabets in PDF

david.lee
david.lee Member
edited February 11, 2022 in Analytics #1
<p>Hi,</p>
<p> </p>
<p>There are both of Traditional Chinese characters and Vietnamese characters on the report,</p>
<p>there is no problem in Traditional Chinese characters on BIRT report.</p>
<p> </p>
<p>When we choose HTML to print a BIRT report, both characters are correct,</p>
<p>when choosing PDF to print a BIRT report, the report misses some Vietnamese alphabets</p>
<p>, and so does EXPORT to a PDF file.</p>
<p> </p>
<p>In other words, some Vietnamese characters cannot be entirely/correctly shown on BIRT PDF report!</p>
<p>And this problem occurs in BIRT PDF only.</p>
<p> </p>
<p>Environment:</p>
<p>Server: Ubuntu Server 14.04 + Oracle JDK 8 + Tomcat 7<br>
Client : Windows 7/8.1, Ubuntu Desktop 14.04</p>
<p> </p>
<p> </p>
<p>Thank you for help!</p>
<p> </p>
<p> </p>
<p>Best,</p>
<p>David</p>

Comments

  • Clement Wong
    Clement Wong E Community Moderator
    <p>To help you troubleshoot this issue...</p>
    <p> </p>
    <p>What version of BIRT are you using?</p>
    <p> </p>
    <p>Are they any issues when printing/converting to PDF from the report on the BIRT Designer machine?  If no, what operating system is the BIRT Designer running on?</p>
    <p> </p>
    <p>Do you have a sample design that you can send?  A very simple report with no connection, a text label with the Vietnamese characters that are not working, and the exact font defined in that text label.</p>
    Warning No formatter is installed for the format ipb
  • david.lee
    david.lee Member
    edited August 2, 2016 #3
    <p>Hi,<span style="font-size:12px;"><b> </b>Clement,</span></p>
    <p> </p>
    <p>Thank you for your quick reply.</p>
    <p> </p>
    <p>Server : Ubuntu Server 14.04, Oracle JDK 8, Tomcat 7<br>
    Client : Windows 7/8.1, Ubuntu Desktop 14.04LTS</p>
    <p>BIRT version 4.4.2</p>
    <p> </p>
    <p>Attached files:</p>
    <p>testvn.rptdesign,the report for test.</p>
    <p> </p>
    <p>normal_VN_characters.png,the original VN characters of "testvn.rptdesign".<br>
     </p>
    <p>testvn .pdf :</p>
    <p>After deploying the testvn.rptdesign, no missing VN alphabets when printing HTML!<br><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">When printing/converting to PDF from the report, it misses </span>VN alphabets! </p>
    <p> </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">We usually use BIRT Designer on</span><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> both Windows 7/8.1 and Ubuntu desktop 14.04,</span><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> VN characters are all correctly shown on BIRT Designer in design time.</span></p>
    <p> </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Thank you so much for help!</span></p>
  • Clement Wong
    Clement Wong E Community Moderator
    <p>The configuration issue here is that when you run the BIRT report and convert to PDF, the fonts for the Vietnamese character set are not available for the PDF converter on the Liunx environment.  On your Windows Designer, it's picking up Arial for Sans Serif.  And the Times New Roman on Windows has the extended characters.</p>
    <p> </p>
    <p>There is a solution.  You will need to modify the BIRT fonts configuration on your Linux environment so that 'Sans Serif' or a specific font will be used, and you will need to have the font file (TTF) on your Linux machine.</p>
    <p> </p>
    <p>If you are licensed to for Microsoft fonts installed on other machines, such as Arial or Arial Unicode MS, then that would be a good start.</p>
    <p> </p>
    <p>Otherwise, you'll need to look at other TTF fonts that support Vietnamese that you'll be able to install on your Linux server:</p>
    <p><a data-ipb='nomediaparse' href='http://www.wazu.jp/gallery/Fonts_Vietnamese.html'>http://www.wazu.jp/gallery/Fonts_Vietnamese.html</a></p&gt;
    <p><a data-ipb='nomediaparse' href='https://vietnamesetypography.com/type-recommendations/'>https://vietnamesetypography.com/type-recommendations/</a></p&gt;
    <p><a data-ipb='nomediaparse' href='https://www.fontsquirrel.com/fonts/list/language/vietnamese'>https://www.fontsquirrel.com/fonts/list/language/vietnamese</a></p&gt;
    <p> </p>
    <p> </p>
    <p>First, in your design, you'll need to specify a font say 'Arial'.  In the attached design, the last two samples use Arial and Arial Unicode MS, respectively.</p>
    <p> </p>
    <p>Second, on your BIRT Engine (server) machine, you'll need to:</p>
    <p> </p>
    <p>1.    Stop Tomcat.</p>
    <p> </p>
    <p>2.    Copy Arial and Arial Unicode to a common font location such as /usr/share/fonts<br><br><span style="font-family:'courier new', courier, monospace;">* arial.ttf<br>
    * ariblk.ttf<br>
    * arialbd.ttf<br>
    * arialbi.ttf<br>
    * ariali.ttf<br>
    * ARIALN.TTF<br>
    * ARIALNB.TTF<br>
    * ARIALNBI.TTF<br>
    * ARIALNI.TTF<br>
    * ARLRDBD.TTF<br>
    * ARIALUNI.TTF</span><br>
     </p>
    <p>3.    Male sure the permissions are correct on the files so that Tomcat user can access those files.<br><br>
    4.    Extract the fontsConfig.xml in the JAR (org.eclipse.birt.runtime_4.4.2.jar) under .../tomcat/webapps/birt/WEB-INF/lib<br><br>
    5.    Back up the fontsConfig.xml to fontsConfig.xml.bak.<br><br>
    6.    Modify the fontsConfig.xml file added <path...> entry under <font-paths><br><br><span style="font-family:'courier new', courier, monospace;">            <font-paths><br>
                            <path path="/usr/share/fonts" /></span></p>
    <p> </p>
    <p>6.    Add the modified fontsConfig.xml back into the org.eclipse.birt.runtime_4.4.2.jar</p>
    <p> </p>
    <p>7.    Restart Tomcat.</p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p>Attached is my test .rptdesign, output PDF with Vietnamese characters properly displayed and the fontsConfig.xml.<br>
     </p>
    Warning No formatter is installed for the format ipb
  • <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hi,</span><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;font-size:12px;"><b> </b>Clement,</span><br>
     </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;font-size:12px;">Thank you so much for your guidance!</span></p>
    <p> </p>
    <p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;font-size:12px;">Best,<br>
    David Lee</span></p>