I'm creating a PDF document and inside of it i'm creating a table.
I want some cells to have bold text style.
How can thi开发者_JAVA技巧s be done?
Before adding text to the cell, Create a new paragraph with the text you want to add.
Paragraph paragraph=new Paragraph("Test in the Cell");
paragraph.getFont().setStyle(Font.BOLD);
Cell c=new Cell(paragraph);
table.addCell(c);
For those Cells in which you need not want the bold just simply remove the line
paragraph.getFont().setStyle(Font.BOLD);
精彩评论