Home
Analytics
PDF rendering not properly on birt report PDF
Nikhila
<p>Hi ,</p>
<p> </p>
<p>I want to display Hindi text in birt PDF. I have used font as Arial Unicode MS via birt designer. I am able to view Hindi texts in report. But some texts are not proper.</p>
<p>For eg: I want to show <span style="color:rgb(0,0,0);font-family:'Arial Unicode MS';font-size:13.3333330154419px;">रिपोरà¥à¤Ÿ in PDF but it is not rendered properly. But it is rendering correctly on HTML and excel formats.</span></p>
Find more posts tagged with
Comments
Clement Wong
<p>You may need to edit <span>fontsConfig.xml so the the PDF emitter can handle those fonts properly. Look at this DevShare @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1041-pdf-rendering-diferent-fonts/'>http://developer.actuate.com/community/forum/index.php?/files/file/1041-pdf-rendering-diferent-fonts/</a></span>
; or this previous post @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/28337-missing-font-in-rendering-pdf/'>http://developer.actuate.com/community/forum/index.php?/topic/28337-missing-font-in-rendering-pdf/</a></p>
;
<p> </p>
<p>What version of BIRT are you using?</p>
<p> </p>
<p><span>Are you viewing the PDF</span> from the Designer? What operating system is running on the Designer machine?</p>
<p> </p>
<p>How did you deploy the .rptdesign? Are you using the BIRT Engine or iHub? What OS is running on this machine? Does this font</p>
Nikhila
<p>Hi,</p>
<p> </p>
<p>My birt run time version is org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar</p>
<p> </p>
<p>I am rendering PDF from URL. My machine OS is windows 7</p>
<p>I have modified my fontsConfig.xml file for Arial Uniciode mS. But while rendering via URL how it will affect?</p>
Clement Wong
<p>Since you are using Windows, there is no need to update fontsConfig.xml at this time.</p>
<p> </p>
<p>Does the PDF generate correctly when using the Designer? <em>(Run > View Report > As PDF)</em></p>
<p> </p>
<p>Attached is an .rptdesign and PDF that works in my environment from OS BIRT Designer 3.7.2 on Windows 7.</p>
<p> </p>
<p>Can you run the attached .rptdesign in your designer and from your app server to see what the result is?</p>
Nikhila
<p>I am also able to view Hindi text in my report. But the problem is not rendered proper text. Please check your PDF and report design. In design page the text is correct but in PDF rendered Hindi text is not correct. Same thing is happening on my side also. But in HTML rendered text is correct.</p>
Clement Wong
<p>Oh, sorry, yes, I see the difference now. It might appear that the PDF export (via iText) cannot handle the ligatures in that character set with Arial Unicode MS (reference @ <a data-ipb='nomediaparse' href='
http://itext.2136553.n4.nabble.com/Hindi-unicode-PDF-files-are-not-displaying-properly-tp2145629p4655165.html'>http://itext.2136553.n4.nabble.com/Hindi-unicode-PDF-files-are-not-displaying-properly-tp2145629p4655165.html</a>)
. However, I recall a previous thread that they used the font "Shusha" and was able to generate the PDF correctly. Maybe another Devanagari font will work?</p>
Nikhila
<p>I have tried <span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;">Devanagari font. But in that case Hindi text is not displayed on PDF report via URL. I am able to view Hindi text correctly on designer preview. What i am wrong in that?</span></p>
Nikhila
<p>How can i resolve this? Does anyone have an idea? Please help me</p>
Clement Wong
<p>If a font displays in the Viewer, but not in PDF, then please check or add the <mapping> in the fontsConfig.xml. So to confirm, using a different font, does the PDF appear correctly when run and viewed from the Designer machine (<em>Run > View Report > As PDF)</em>? If so, where have you deployed the report to? Have the same changes been made to the fontsConfig.xml where you have deployed?</p>
Nikhila
<p>I want to deploy my applicatin to Tomcat 7.0</p>
<p>I am not able to view correct text on(<em>Run > View Report > As PDF).</em></p>
<p><em>Right now i am running my application in eclipse with tomcat server. And also how the application in Tomcat will affect fontsConfig.xml?</em></p>
Clement Wong
<p>The PDF emitter uses iText and iText will not render Indic scripts (Hindi fonts) correctly. iText has not addressed this feature yet so others have tried to workaround it (<a data-ipb='nomediaparse' href='
http://palashray.com/making-itext-work-with-indic-scripts/'>http://palashray.com/making-itext-work-with-indic-scripts/</a>)
. Or it's possible to create another PDF emitter that would output to an intermediate format such as ODF (<span>Open Document Format)</span> and use the Open Office PDF export API (<a data-ipb='nomediaparse' href='
https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export'>https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export</a>)
to deliver the PDF.</p>