Example #1
0
  private PdfPTable getFooter() throws DocumentException, IOException {

    PdfPTable table = new PdfPTable(2);
    table.setWidths(new int[] {50, 50});
    table.setWidthPercentage(100);

    Chunk chunk3 =
        new Chunk("INVESTEURS CONSULTING PVT LTD", new Font(getcalibri(), 11, Font.BOLD));
    Phrase ph3 = new Phrase(chunk3);

    Chunk chunk4 = new Chunk(" (Building Businesses)", new Font(getcalibri(), 8, Font.NORMAL));
    Phrase ph4 = new Phrase(chunk4);

    Paragraph paragraph = new Paragraph(15);
    paragraph.add(ph3);
    paragraph.add(ph4);

    PdfPCell cell = new PdfPCell(paragraph);
    // cell.setRowspan(1);
    cell.setColspan(2);
    cell.setBorder(1);
    cell.setPaddingTop(15);
    cell.setSpaceCharRatio(0);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell =
        new PdfPCell(
            new Phrase(
                25,
                "S-26-27-28, III Floor, Veera Tower, Green Park Extn, New Delhi-110016",
                new Font(getcalibri(), 9, Font.NORMAL)));
    // cell.setRowspan(1);
    cell.setColspan(2);
    cell.setBorder(0);
    cell.setPadding(0);
    cell.setSpaceCharRatio(0);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    cell =
        new PdfPCell(
            new Phrase(
                25,
                "Phone: +91 11 2652 2441/42, 2696 9767   Fax: 2651 2226",
                new Font(getcalibri(), 9, Font.NORMAL)));
    // cell.setRowspan(1);
    cell.setColspan(2);
    cell.setBorder(0);
    cell.setPadding(0);
    cell.setSpaceCharRatio(0);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);
    Anchor anchor;
    BaseColor baseColor = new BaseColor(0, 0, 255);
    anchor =
        new Anchor("www.investeurs.com", new Font(getcalibri(), 11, Font.UNDERLINE, baseColor));
    anchor.setReference("www.investeurs.com");
    Paragraph p = new Paragraph(25, "");
    p.add(anchor);
    cell = new PdfPCell(p);
    // cell.setRowspan(1);
    cell.setColspan(2);
    cell.setBorder(0);
    cell.setPadding(0);
    cell.setSpaceCharRatio(0);
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    table.addCell(cell);

    return table;
  }
Example #2
0
 private Anchor createAnchor(SheetGraphics graphics, String text, String reference) {
   Anchor phrase = new Anchor(text, getFont(graphics));
   phrase.setReference(reference);
   return phrase;
 }