Hi, please, ignore my last post. I need to put a String inside a Paragraph and the Paragraph inside the PdfPCell. If I do:

...
pCell = new Paragraph("teste");
...
cell.addElement(pCell);
...
table.addCell(cell);
..

The cell height is major than the "teste" string height. Now, If I do:

...
table.addCell("teste");
...

The cell height is the same of the "teste" string height. It's very good but I need to put the paragraph inside the cell. I'm trying use:

...
pCell = new Paragraph("teste");
...
Font font = FontFactory.getFont("TimesRoman", 9, Font.NORMAL, new Color(0,0,0));
BaseFont bf = font.getBaseFont();
pCell.setLeading(bf.getAscentPoint("teste", font.getCalculatedSize()) - bf.getDescentPoint("teste", font.getCalculatedSize()));
...
cell.addElement(pCell);
...
table.addCell(cell);
..

But the method font.getBaseFont() return null. Please, help me!

[]s

Ary Junior


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to