Jump to content
We've recently updated our Privacy Statement, available here ×

I-report & PDF Encoding CP1251 (Cyrillic)


part_od

Recommended Posts

  • 1 year later...
  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

That should work fine, if you have a font selected that correctly displays cyrillic.

 

I'm trying to do the same, and I found that using Tahoma as the font (also pdfFontName - I actually set it to

Code:
c:\windows\fonts\tahoma.ttf - do use double \!!! ) - and setting pdfEmbedded 'true', then it works, kind of.

 

It works for static textFields - I have not yet figured out how to get data textFields to display cyrillic. So far none of the advice I've fo und here has worked. :(

Post edited by: sww, at: 2008/01/10 12:25

Link to comment
Share on other sites

Thanks for the Tahoma tip, it does work. I have the same problem, and there is at least dozen threads on this forum abuut this problem, and not one good answer. It would be nice if someone from the development team gave us the solution.

 

However, I've tested my reports with Foxit and it displays Cyrillic as it should, with all fonts, but Adobe Reader is the problem.

Link to comment
Share on other sites

I have just downloaded Foxit but the DATA textfields - i.e. the ones populated from the page data source with cyrillic characters - are still all blank.

 

I have used the debugger to trace the code where the data is read from the data model, and I can see the cyrillic characters in the data at that point.

 

The data is all held in Java Strings, so I can't understand why it isn't displaying them properly.

 

I wish someone would either tell us straight how it's done OR simply admit it can't be done, if that is the case.

Link to comment
Share on other sites

I have just tried something different, and now got a textfield populated from the data model that IS displaying (one) cyrillic character - I just changed one character in a string in the DB and it's showing in the PDF...

 

The other fields that are NOT displaying are a) in a crosstab and b) in a subreport...

 

Once I've figured out what's going on I'll report back.

Link to comment
Share on other sites

Well, I've got it working :)

 

It is a complex inter-play between iReports and the configuration needed by iText (within JasperReports.)

 

Simple fix:

 

For 'fontName' select a fontname that maps to one of the built-in PDF fonts - e.g. Times New Roman, and for the pdfFont set it to "c:/windows/fonts/tahoma.ttf" - and you *should* see the cyrillic characters as required.

 

I am currently looking further for a more complete solution, but the above should get things moving forward.

Link to comment
Share on other sites

Great!

 

I don't have much time right now to experiment with cyrillic encoding, but I will get to it as soon as I can!

 

One other thing, I tried reading cyrillic values from the database, and Foxit displays them as it should with default settings (Font Name = SansSerif, PDF Font Name = Helvetica). I am using iText-2.0.7.jar.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...