0

How to set encoding in iText. When I write in another language it writes empty spaces. Any idea? I found it :) but now I dont know how to make this font for data in table do u know ?

Bruno Lowagie
  • 73,590
  • 10
  • 107
  • 159
user1761818
  • 355
  • 1
  • 7
  • 13
  • 1
    Refer this: http://stackoverflow.com/questions/6181518/how-to-create-a-pdf-document-from-languages-of-unicode-char-set-regarding-using – Yogendra Singh Nov 09 '12 at 04:47

1 Answers1

0

So you're creating a table with cells and you want the text in the cells to have a font that is different from Helvetica.

That's easy: you already know how to create a Font and a Paragraph (or a Phrase) from the answer in the comment.

Now create a PdfPCell using a Phrase in the constructor (text mode) or by adding a Paragraph with addElement() (composite mode).

Now when you use addCell(), pass that PdfPCell instance instead of a String.

Also: read the documentation before you start coding: http://itextpdf.com/book

Bruno Lowagie
  • 73,590
  • 10
  • 107
  • 159