List of usage examples for com.itextpdf.text.pdf PdfPRow PdfPRow
public PdfPRow(PdfPRow row)
From source file:net.pickapack.util.TableHelper.java
License:Open Source License
private static void addRow(PdfPTable table, boolean header, List<String> values) { List<PdfPCell> cells = new ArrayList<PdfPCell>(); for (Object value : values) { PdfPCell cell = new PdfPCell(new Phrase(value + "", header ? boldFont : normalFont)); if (header) { cell.setHorizontalAlignment(Element.ALIGN_LEFT); }/*from w w w. j a v a 2s . co m*/ cells.add(cell); } table.getRows().add(new PdfPRow(cells.toArray(new PdfPCell[cells.size()]))); }