Arabic Font Not Appearing in Birt 3.7.1 PDF Report

Options
Hassan Nehme
edited February 11, 2022 in Analytics #1
<p>Hello,</p>
<p> </p>
<p>- Environment: Birt 3.7.1 / Maximo 7.5.0.4 / Sun Solaris 10</p>
<p> </p>
<p>- Problem: Arabic Font Not Appearing in Birt 3.7.1 PDF Report generated from Maximo 7.5.0.4 Application running on Sun Solaris 10.</p>
<p> </p>
<p>- Details:</p>
<p>1- Birt Viewer is displaying the report correctly with Arabic font as HTML and MS Word, but PDF is eliminating the Arabic characters completely.</p>
<p>2- I changed the encoding in both files fontsConfig.xml and fontsConfig.xml from cp1252 to cp1256, in the generated PDF file from Maximo the Arabic letter were replaced by '?'</p>
<p>3- I changed the encoding from to utf-8 as per advise in one of the web notes, but again Arabic disappeared from the PDF.</p>
<p> </p>
<p>Kindly advise.</p>
<p> </p>
<p>Attached are the fontConfig files before we modified it.</p>
<p>

Comments

  • Clement Wong
    Clement Wong E mod
    edited July 24, 2017 #2
    Options
    <p>Does this report show the Arabic in the PDF from a Windows environment?  You can try generating the PDF from the Designer on a Windows machine.</p>
    <p> </p>
    <p>Can you please attach the modified fontsConfig_pdf.xml?  Did you modify fontsConfig.xml?</p>
    <p> </p>
    <p>What's the font name?  What's the .TTF file name?  Where is it located?</p>
    <p> </p>
    <p>Did you follow steps outlined like this?</p>
    <p><a data-ipb='nomediaparse' href='http://developer.actuate.com/community/forum/index.php?/topic/39439-missing-vietnamese-alphabets-in-pdf/?p=144792'>http://developer.actuate.com/community/forum/index.php?/topic/39439-missing-vietnamese-alphabets-in-pdf/?p=144792</a></p&gt;
    Warning No formatter is installed for the format ipb
  • <p>Thank you Clement.<br><br>
    The PDF report shows the Arabic correctly from windows environment.<br><br>
    We have created new folder on Sun server: '/u01/app/mxeam/fonts' with required access and permission to the user, to this folder we copied the below fonts files from a windows 7 machine 'C:\Windows\Fonts\'.<br><br>
    arial.ttf<br>
    arialbd.ttf<br>
    arialbi.ttf<br>
    ariali.ttf<br>
    ARIALN.TTF<br>
    ARIALNB.TTF<br>
    ARIALNBI.TTF<br>
    ARIALNI.TTF<br>
    ariblk.ttf<br>
    cour.ttf<br>
    courbd.ttf<br>
    courbi.ttf<br>
    couri.ttf<br>
    times.ttf<br>
    timesbd.ttf<br>
    timesbi.ttf<br>
    timesi.ttf<br><br>
    Attached are the modified files fontsConfig.xml and fontsConfig_pdf.xml.</p>
    <p> </p>
    <p>I tried the font 'Times New Roman' and 'Arial'.<br><br>
  • Clement Wong
    Options
    <p>Where did you modify fontsConfig.xml?</p>
    <p> </p>
    <p>Did you restart the app after modifying?</p>
    <p> </p>
    <p>As a test to see if Arial is being used in the PDF output...  Create a simple report with a label using Arial font with ASCII text.  Generate the PDF on your server.  We should see the font output as Arial.  If it's not working, we'll see a Serif font (Times New Roman like) instead.</p>
    <p> </p>
    <p>Also, as a test, can you modify fontsConfig.xml and point to the TTF directly, adding as the first entry like the following:</p>
    <pre class="_prettyXprint">
    <path path="/u01/app/mxeam/fonts/arial.ttf"/></pre>
    Warning No formatter is installed for the format ipb
  • <p>A - fontsConfig.xml and fontsConfig_pdf.xml files were extracted from the below jar file, modified and then re-packaged within our application ear file and re-deployed on the weblogic server v.10.3.6.<br><br><br>
           - .\webmodule\WEB-INF\birt\platform\plugins\org.eclipse.birt.report.engine.fonts_3.7.1.v20110905.jar<br><br>
    B - The application services were restarted after the deployment.<br><br>
    C - After adding '<path path="/u01/app/mxeam/fonts/arial.ttf"/>' to the fontsConfig.xml file and re-deployed the application, I have performed the requested test with ASCII text, from the generated PDF, below are the font properties:<br><br>
        Font: ArialMT (Embedded Subset)<br>
        Type: TrueType(CID)<br>
        Encoding: Identity-H<br><br>
    I have performed the same test with Arabic text (Arial Font), '?' is displayed in the PDF file, the font properties listed below:<br><br>
        Font: ArialMT (Embedded Subset)<br>
        Type: TrueType(CID)<br>
        Encoding: Identity-H<br><br>
        Font: Time-Roman<br>
        Type: Type1<br>
        Encoding: Custom<br>
        Actual Font: TimesNewRomanPSMT<br>
        Actual Font Type: TrueType<br>
     <br>
    I have performed the same test with Arabic text but Times New Roman font, '?' is displayed in the PDF file, the font properties is listed below:<br><br>
        Font: TimesNewRomanPSMT (Embedded Subset)<br>
        Type: TrueType(CID)<br>
        Encoding: Identity-H<br><br>
        Font: Time-Roman<br>
        Type: Type1<br>
        Encoding: Custom<br>
        Actual Font: TimesNewRomanPSMT<br>
        Actual Font Type: TrueType<br><br><br>
    Maybe encoding is something that we need to look at it.<br><br>
    Thank you.</p>
  • Clement Wong
    Options
    <p>ArialMT that is expected.  The Time-Roman means that the font for Arabic didn't get picked up.</p>
    <p> </p>
    <p>Did the ASCII report show the Arial font properly?</p>
    <p> </p>
    <p>Can you please attach your simple .rptdesign with Arabic?</p>
    Warning No formatter is installed for the format ipb
  • <p>The ASCII report showed the Arial font properly.</p>
    <p> </p>
    <p>I have attached my Arabic simple report (ver. 3.7.1).</p>
    <p> </p>
    <p>I couldn't run your report as it is having the version 3.7.2, but any way I have updated it with Arabic text and attached it in this post.</p>
    <p> </p>
    <p> </p>
    <p>
  • Clement Wong
    Clement Wong E mod
    edited July 26, 2017 #8
    Options
    <p>Since Arial is working for ASCII, then the next step is to see if the Arabic in Arial font is working.</p>
    <p> </p>
    <p>In your fontsConfig.xml under <span style="font-family:'courier new', courier, monospace;"><font-encodings></span>, do you have an entry like the following?  If not, add one in.  Redeploy, and test the Arial Font Test (with the Arabic text).</p>
    <pre class="_prettyXprint">
             <encoding font-family="Arial" encoding="Cp1256" /> </pre>
    <p>1256 is the code page for Arabic.</p>
    Warning No formatter is installed for the format ipb
  • <p>I have added the suggested line to fontsConfig.xml and re-deployed the application, '?' is still coming, below are the generated PDF font properties (the simple report is having only one label with Arabic Text):</p>
    <p> </p>
    <p>    Font: ArialMT (Embedded Subset)<br>
        Type: TrueType<br>
        Encoding: Custom</p>
    <p> </p>
    <p>Thank you.</p>
  • <p>have tried also the encoding iso-8859-6 but issue not resolved.</p>
  • Clement Wong
    Clement Wong E mod
    edited July 31, 2017 #11
    Options
    <p>Unfortunately, I don't have a "Birt 3.7.1 / Maximo 7.5.0.4 / Sun Solaris 10" environment to test.</p>
    <p> </p>
    <p>Are you able to replicate the issue without Maximo?  Just trying to pare down the components.  Can you deploy BIRT to Tomcat on the same machine and test?</p>
    <p> </p>
    <p>Or replicate the issue on a different non-Windows OS such as Linux?</p>
    <p> </p>
    <p>To attempt to replicate on my end, it looks like I can download a VM of Sun Solaris 10 ( Are you using SPARC, or x86?  I would be able to run the later.</p>
    <p> </p>
    <p>What app server does Maximo 7.5.0.4 use?</p>
    <p> </p>
    <p>What version of Java?</p>
    <p> </p>
    <p>NOTE: I did testing on environments I do have such as iHub on CentOS 7, and the Arabic Arial Font test report generates successfully.  During this week, I will test in CentOS 6.5 and BIRT 3.7.2 and 3.7.1 with the Arabic Arial Font report in a standard install, and one that has the fonts and updated config files.</p>
    Warning No formatter is installed for the format ipb
  • <p>Hi Clement,</p>
    <p> </p>
    <p>I didn't try to replicate the issue without Maximo, I will try to setup an environment and replicate the issue on Sun Solaris 10 environment.</p>
    <p> </p>
    <p>We are on Oracle web logic version 10.3.6, Java version is 1.6 rev. 37</p>
    <p> </p>
    <p>Thank you.</p>