// Line 1
header.addCell(new Paragraph(""));
header.addCell(new Paragraph(""));
Paragraph p = new Paragraph("Cotizacion no.: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
header.addCell(p);
p = new Paragraph(quotation.getId().toString(), new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
// Line 2
header.addCell(new Paragraph(""));
header.addCell(new Paragraph(""));
p = new Paragraph("Fecha: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
header.addCell(p);
String quotationDate = simpleFormat.format(quotation.getTransDate());
p = new Paragraph(quotationDate, new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
// Line 3
p = new Paragraph("Empresa: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
String companyName = quotation.getCompany().getDescription();
p = new Paragraph(companyName, new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
p = new Paragraph("Moneda: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
header.addCell(p);
p = new Paragraph(quotation.getCurrency().getDescription(), new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
// Line 4
p = new Paragraph("Contacto: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
String firstName = quotation.getContact().getFirstName();
String lastName = quotation.getContact().getLastName();
String contactName = quotation.getContact().toString();
p = new Paragraph(contactName, new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
header.addCell(new Paragraph(""));
header.addCell(new Paragraph(""));
// Line 5
p = new Paragraph("Telefono: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
String phone = quotation.getCompany().getPhone();
p = new Paragraph(phone, new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
header.addCell(new Paragraph(""));
header.addCell(new Paragraph(""));
// Line 6
p = new Paragraph("Fax: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
String fax = quotation.getCompany().getFax();
p = new Paragraph(fax, new Font(Font.HELVETICA, 12, Font.NORMAL));
header.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
header.addCell(p);
header.addCell(new Paragraph(""));
header.addCell(new Paragraph(""));
// Line 7
p = new Paragraph("Descripcion: ", new Font(Font.HELVETICA, 12, Font.NORMAL));
p.setAlignment(Element.ALIGN_LEFT);
header.addCell(p);
String description = quotation.getDescription();
p = new Paragraph(description, new Font(Font.HELVETICA, 12, Font.NORMAL));
p.setAlignment(Element.ALIGN_LEFT);
header.getDefaultCell().setColspan(3);
header.addCell(p);
document.add(header);