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 ?
Asked
Active
Viewed 924 times
0
-
1Refer 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 Answers
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
- 75,994
- 9
- 109
- 165