Hi, 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(Style.DEFAULT_FONT_FAMILY,
Style.DEFAULT_FONT_SIZE, Font.NORMAL,
Style.DEFAULT_FONT_COLOR);
BaseFont bf = font.getBaseFont();
pCell.setLeading(bf.getAscentPoint("teste",
tm.getFont().getCalculatedSize()) - bf.getDescentPoint("teste",
tm.getFont().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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions