postgres and displaying through iReport.
I have set pdf fontname='Lohit Tamil', font name ='lohit tamil',
and Pdf encoding as Identity-H(unicode with Horizontal writing)
I have tried with iReport-1.2.0 and iReport-2.0.2 versions.
The report is coming properly in JRViewer, Firefox etc. but
display is not proper in pdf
I need a solution.
Partha
26 Answers:
Post edited by: partha99, at: 2007/12/11 05:23
Post edited by: partha99, at: 2007/12/11 05:25
I looked at your uploaded example, and I tried something very similar to imitate it with the FirstJaspser sample but it worked for me (using my Akshar.ttf font file)
So, what do you see instead of the correct Tamil characters? Here's what I suggest trying as an experiment. Instead of printing your $F{dist_name_t} data, just put the string "\u0b90\u0bb0" which are two valid unicde Tamil characters. See if they appear correctly.
Betty
Thanks for your good suggestion.
Checked with directly inputting unicode values in text field in iReport.
They display properly in pdf output also.
when retrieved from the database certain combination character
like unicode values like u0b90,u0bb0. combination of consonant and vowels.
are not displayed properly in pdf output only
whereas jrviewer and html gives proper output.
Iam using postgres 7.4 with UTF-8 encoding.
storing the data using ISO--8859-1 encoding
retrieving the data using UTF-8 encoding
if i store and retrieve using UTF-8 it stores only junk and displays junk.
expecting further suggestions please.
K.Parthasarathy
I'm afraid now your problem is outside of my knowledge base. I've only used the unicode characters for their symbols, so my reports have just contained the strings with the hex representation of the characters. I've never tried display data from a database that has special characters. Also, I've never used postgresSQL-- we use oracle and mysql here. Otherwise, I'd play with with a simple example.
My first suggestion is to make sure that your tamil characters made it into your DB correctly. One simple thing you can do is run a simple JDBC program to read the data back into java String and just dump out the unicode characters of the String to be sure that Java reads the data correctly and you get the unicode that you expect. Then, you can deal with jasper issues after that.
Betty
Looking at the report sample you posted, I can tell that you are not using isPdfEmbedded="true". I think you should, otherwise you are counting on the tamil font to be installed on the system where you view the PDF. This is probably not the case, hence the problem.
Also, make sure you use the pdfFontName attribute also in the styles, your default style there does not use it.
I hope this helps.
Teodor
In tamil the typing sequence is different from the display format.
In display consonants and vowels combine and display as a single letter whereas they are 2 different keystrokes.
The database displays in proper format when queried using query tool.
When the value is extracted using a jsp program it gives
unicode literal values they are as per typing sequence.
This is properly hanlded by browsers like firefox with pango support and Konqueror.
when i type in Openoffice writer and convert to pdf it does properly.
I feel the support is not there is itext which ireport used for pdf conversion for handling indian languages.
Is there any other utility like itext which can generate pdf from ireport with proper display
or is there any plugin for itext to handle this.
You mean it is about text run direction: right-to-left and left-to-right mixed writing?
I think iText is pretty good when it comes with text direction, as far as I know.
It would be helpful if you could post some relevant files here, like JRXML with hardcoded text fields and resulting PDF, as well as a screenshot of the correct output.
Thank you,
Teodor
I feel the support is not there is itext which ireport used for pdf conversion for handling indian languages. Is there any other utility like itext which can generate pdf from ireport with proper display or is there any plugin for itext to handle this. |
I found [url=http://article.gmane.org/gmane.comp.java.lib.itext.general/18135/match=t... apparently related psot on the iText forum. Quoting from the post:
the words in some languages, like Hindi are spelled wrong. This is because iText shows you the characters as they appear in the XML. iText doesn't do ligaturizing for Indic languages, only for Arabic. (If somebody feels like writing an IndicLigaturizer, I'd be happy to add it to iText.) |
The post is from two years ago but I couldn't find any indication that this has been fixed in the mean time.
If this is the problem you are describing, then I don't think there's anything you can do to make it work in iReport. The only way of producing PDF output with JasperReports is by using the iText-based PDF exporter.
Regards,
Lucian
Iam attaching the jrxml and screenshots in html and pdf generated with iReport.
Iam able to generate pdf from openoffice writer properly.
Since both are opensource community can the solution be obtained for itext from openoffice.
Partha
[file name=unicodepdftest.zip size=36087]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/uni...
If two products are both open source, it does not mean they work the same. They are two different products, developed by different people, using totally different technologies. The fact that it works for you in OpenOffice, is completely irrelevant to why it does not work in iText.
In any case, this is not something we can help with at this point. You should consider posting this on the iText discussion forums and mailing lists.
Thanks,
Teodor
The problem is with the PDF font u have selected. Please select a font having a unicode characters. For example Arial_UnicodeMS. You want find this in the normal list of PDF fonts. But you can set the "windows fonts" path in the classpath of iReport. After doing this you will get this font name. Try one of the Identity-H or Identity-V. it will work wonders. Please see the attachement. In your case the Tamil fonts need to be in Unicode. Only then can u see the fonts correctly in pdf. But i feel Tamil by default will be unicode.
Hi the same pbm coming for me too. I have filled all that info which was mentioned on this previous posts . But still that tamil font on PDF is not coimng properly .Pls give the correct info about this.
By
Raja Mani
Junior Research Fellow
India
teodord
Wrote:
Hi, Looking at the report sample you posted, I can tell that you are not using isPdfEmbedded="true". I think you should, otherwise you are counting on the tamil font to be installed on the system where you view the PDF. This is probably not the case, hence the problem. Also, make sure you use the pdfFontName attribute also in the styles, your default style there does not use it. I hope this helps. Teodor |
Hi,
We are happy to release a version of Jasper Reports enabled for
Complex Scripts Support in PDF export. This include languages under
Indic Scripts like Hindi, Tamil, Bengali, Gujarati, Kannada and
others. It also includes support for scripts like Sinhalese and Thai.
It is developed using OpenOffice as a PDF generating agent and API and
does not use iText.
Please download it from http://202.141.136.157/
Have a great day.
Best Regards
-RKVS Raman
just give the path of ttf in font tag. and must ser isPdfEmbede=true.
Thanx.
SOLUTION FOR TAMIL REPORTS AND PDF IN TAMIL
I used LE-ET-Ramya(etramya.ttf) Tamil Font For Tamil Reports
set pdfFontName="etramya.ttf" and isPdfEmbedded ="true" for user tamil field $F{TamilName}
we can store data in table and reterive directly from table and display reports in pdf/html/ODF file in tamil is working.
in servlet to work for particular jrxml field set pdffontname with font store location path
eg:
pdfFontName="font/etramya.ttf"
To download font http://www.elcot.in/tamilfonts_download_list.php
any query come forward free to ask
Thanks and Regards,
karthikeyan
Attachment | Size |
---|---|
![]() | 3.69 KB |
Attachment | Size |
---|---|
![]() | 4.59 KB |
I have used Akshar Unicode font, with this you can export PDF through iReport Designer but it get fail in Browser to open PDF.