• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Multilingual PDF Creation (in all indian languages)

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a module to generate PDF documents, which has to be processed by another module for some security features. Currently we are using iText API to create PDF documents in case of English. But we have to implement i18n in our application ( for all Indian languages). So we need to generate the PDF document in other Indian languages like Hindi, Guajarati, Kannada etc. Following are some criteria to be considered.

1. The document may have more than one language texts with English texts.
2. The document may contain all the numeric of all languages and special characters.
3. We are storing data in database as UNICODE(UTF-8) and using the JDBC API to retrieve.

Kindly suggest us some solution with iText API. Let us know if some other PDF API is supporting all Indian languages.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iText and PDFs can handle Unicode. As long as the machine on which the document is viewed has fonts available that cover all characters (like Microsoft Arial Unicode), there should not be any problems. If no such font is available, you can use iText to embed the font in the document. Note that such fonts are big (MS Arial Unicode is about 20 MB in size, IIRC), and that not all font licenses permit distribution of the font.

This may help: http://www.alanwood.net/unicode/fonts.html
 
Marshal
Posts: 75711
354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not a "beginning" question. Moving thread.
 
Satish Kumar Kara
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the Machine on which the document is viewed has fonts which supports the particular language and

We are embedding the font which supports Hindi (Indian language) in the document using iText as



but still pdf displays different text than expected.We got all the hindi characters, but not in proper format…

For ex:

It displays text as shown in the link provided(hinadi) below, instead of हिन्दी (hindi)

http://doc-08-8o-docs.googleusercontent.com/docs/secure/rb76hs62dof3nkvdingba5cedl9ltjag/uo3tc5pdc11g50ml7n4mbc8t56rq19j9/1270101600000/00409798775290637475/*/0ByYDS0mupIdzZjhjZTdlZTUtZjZmYy00OGJiLTllYjgtYTJjMWZmNjUxZTY5


Note : The text हिन्दी (hindi) is stored in oracle DB in UTF-8 encoding.
We are able retrieve the same in the browser but not in pdf generated using iText.
When the iText is embedding, it is getting changed.

kindly suggest how we can achieve the required.


 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like, basically, it gets it right, except for the first characters being swapped. That might be the Hindi equivalent of using ligatures vs. not using ligatures. A possible workaround is mentioned here.

I see that you also asked this elsewhere, and even got a reply; next time you do that, BeForthrightWhenCrossPostingToOtherSites.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this thread is a few years old, I just wanted to see if anyone has additional information on how to solve the problem. I know there is no official itext solution, but wondering if anyone has come up with a workaround that's effective. Thanks!
 
Die Fledermaus does not fear such a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic