0

I have retrieve the chinese and japanese text from db using resultset and have to write in PDF, so i was trying to do this using oracle db and itext pdf but when i get the chinese text from db, it shows question marks and not able to write it to pdf

Ganesh
  • 903
  • 1
  • 8
  • 18
  • How about using `HELVETICA` (standard 14 fonts) and `CP1252` encoding ? – StackUseR Nov 28 '16 at 06:06
  • Try out [this post](http://stackoverflow.com/questions/14999403/how-to-display-chinese-characters-in-pdf-file-created-with-itextsharp) . It may help you. – StackUseR Nov 28 '16 at 06:07
  • Thanks Ashish, I tried 2nd option of using FontSelector but still the chinese words are not added in PDF. I am getting chinese text from DB in a string and then i am trying write it in PDF. and I can see the chinese text in DB as it is but after retrieval in java string something is happening.. Please help.. – Ganesh Nov 28 '16 at 06:45
  • Are you still getting the same error? I mean the question marks? – StackUseR Nov 28 '16 at 06:52
  • In pdf i am not getting any chinese words, just the blank pdf is generated – Ganesh Nov 28 '16 at 06:55
  • If you have any small example, could you please post it, may be that will help.. in my case chinese text is in db and and generating pdf in java – Ganesh Nov 28 '16 at 06:56
  • Here you can find the examples about [Adding Chinese text with iText](http://developers.itextpdf.com/frequently-asked-developer-questions?id=395) – StackUseR Nov 28 '16 at 07:00
  • Also you should see `Joel Engineer`'s answer [here](https://social.msdn.microsoft.com/Forums/en-US/0aba545a-c8ba-4389-9439-fcad416ee60d/display-chinesejapanese-characters-in-pdf-in-itextsharp-in-c?forum=csharpgeneral) and refer [this](https://www.codeproject.com/articles/196019/display-chinese-characters-in-pdf-created-by-itext) and [this](https://www.codeproject.com/questions/341142/itextsharp-read-pdf-file). – StackUseR Nov 28 '16 at 07:04
  • Missing text is usually due to the font not being embedded, have a look at http://developers.itextpdf.com/examples/font-examples/examples-font-tutorial#15-f03_embedded.java for how to embed a font in itext5. – Samuel Huylebroeck Nov 28 '16 at 10:31

0 Answers0