List of usage examples for com.itextpdf.text.pdf PdfPTable setHorizontalAlignment
public void setHorizontalAlignment(final int horizontalAlignment)
From source file:WeeklyReport.WeeklyPDF.java
public static PdfPTable header() { PdfPTable table = new PdfPTable(1); table.setHorizontalAlignment(Element.ALIGN_MIDDLE); table.setWidthPercentage(100f);//from w ww . j ava 2 s. c o m cell = new PdfPCell(new Phrase("RQS Report", HEADING_FONT)); cell.setColspan(1); cell.setBorder(Rectangle.NO_BORDER); table.addCell(cell); cell = new PdfPCell(new Phrase("Week: " + new ReportingDates().reportPeriod(), SUBHEADING_FONT)); cell.setColspan(1); cell.setBorder(Rectangle.BOTTOM); table.addCell(cell); return table; }