List of usage examples for com.itextpdf.text Font Font
public Font(final FontFamily family, final float size, final int style)
From source file:printers.HojaDeFirmaPrinter.java
License:Open Source License
private void creaCuerpo(Document doc, GregorianCalendar dia, ArrayList<HorarioItem> data) { Collections.sort(data, new ComparatorHorarioItems()); PdfPTable t = new PdfPTable(3); t.setSpacingBefore(15f);//from w w w .j av a2s . com t.setSpacingAfter(10f); t.setWidthPercentage(100); Font fontbold = new Font(Font.FontFamily.HELVETICA, 14, Font.BOLD); PdfPCell c = new PdfPCell(new Paragraph("Asignatura", fontbold)); c.setHorizontalAlignment(PdfPCell.ALIGN_CENTER); c.setPadding(5); t.addCell(c); c = new PdfPCell(new Paragraph("Firma", fontbold)); c.setPadding(5); c.setHorizontalAlignment(PdfPCell.ALIGN_CENTER); c.setPadding(5); t.addCell(c); c = new PdfPCell(new Paragraph("Incidencias", fontbold)); c.setPadding(5); c.setHorizontalAlignment(PdfPCell.ALIGN_CENTER); t.addCell(c); for (HorarioItem h : data) { creaFilaFirma(t, h); } try { doc.add(t); } catch (DocumentException ex) { Logger.getLogger(HojaDeFirmaPrinter.class.getName()).log(Level.SEVERE, null, ex); } }