List of usage examples for com.lowagie.text.pdf PdfPCell setPaddingBottom
public void setPaddingBottom(float paddingBottom)
From source file:uk.ac.ox.oucs.vle.resources.PDFWriter.java
License:Educational Community License
private PdfPCell nameCell(String name, String webauthId, String department) { Phrase phrase = new Phrase(); phrase.add(new Chunk(name, tableNameFont)); phrase.add(Chunk.NEWLINE);/*from w w w . jav a 2 s . co m*/ StringBuilder otherDetails = new StringBuilder(); if (webauthId != null && webauthId.trim().length() > 0) { otherDetails.append(webauthId); } if (department != null && department.trim().length() > 0) { if (otherDetails.length() > 0) { otherDetails.append(" "); } otherDetails.append(department); } phrase.add(new Chunk(otherDetails.toString(), tableOtherFont)); PdfPCell pdfCell = new PdfPCell(phrase); pdfCell.setMinimumHeight(tableNameFont.getSize() * 2f); pdfCell.setHorizontalAlignment(Element.ALIGN_LEFT); pdfCell.setVerticalAlignment(Element.ALIGN_CENTER); pdfCell.setPaddingBottom(tableNameFont.getSize() * 0.5f); pdfCell.setPaddingTop(tableNameFont.getSize() * 0.5f); pdfCell.setPaddingLeft(tableNameFont.getSize()); pdfCell.setPaddingRight(tableNameFont.getSize()); return pdfCell; }