I create a Paragraph with a special underlined font and add this Paragraph 
into a PdfPCell. The problem is, that the underline and the dots of the 
letters "ÄÖÜ" overlap the PdfPCell. What can I do, that the Paragraph complety 
fits into the PdfPCell?

Code example:
Font font = new Font(Font.getFamilyIndex("Arial"), 30, Font.NORMAL, Color.RED);
font.setStyle(Font.BOLD);
font.setStyle(Font.ITALIC);
font.setStyle(Font.UNDERLINE);

Chunk chunk1 = new Chunk("ÄÖÜ", font);
chunk1.setBackground(Color.GRAY);

Phrase phrase1 = new Phrase();
phrase1.add(chunk1);

Paragraph paragraph = new Paragraph();
paragraph.add(phrase1);

PdfPTable table = new PdfPTable(1);
PdfPCell cell = new PdfPCell();

cell.setUseAscender(true);
cell.setUseDescender(true);

cell.addElement(paragraph);
table.addCell(cell);

document.add(table);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to