Package com.lowagie.text

Examples of com.lowagie.text.HeaderFooter


          .toString();
      String headerString = "Rapor Tarihi: " + date + "          "
          + "ALTISOFT /" + "  "
          + "www.altisoft.com.tr / info@altisoft.com.tr";

      HeaderFooter hf = new HeaderFooter(new Phrase(headerString), false);
      document.setFooter(hf);
      document.open();
      BaseFont bf = BaseFont.createFont("C:\\WINDOWS\\Fonts\\Arial.ttf",
          BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
      Font f1 = new Font(bf, 10);
View Full Code Here


            initTable();

            // Initialize the Document and register it with PdfWriter listener and the OutputStream
            Document document = new Document(PageSize.A4.rotate(), 60, 60, 40, 40);
            document.addCreationDate();
            HeaderFooter footer = new HeaderFooter(new Phrase(TagConstants.EMPTY_STRING, smallFont), true);
            footer.setBorder(Rectangle.NO_BORDER);
            footer.setAlignment(Element.ALIGN_CENTER);

            PdfWriter.getInstance(document, out);

            // Fill the virtual PDF table with the necessary data
            generatePDFTable();
View Full Code Here

            initTable();

            // Initialize the Document and register it with PdfWriter listener and the OutputStream
            Document document = new Document(PageSize.A4.rotate(), 60, 60, 40, 40);
            document.addCreationDate();
            HeaderFooter footer = new HeaderFooter(new Phrase(TagConstants.EMPTY_STRING, smallFont), true);
            footer.setBorder(Rectangle.NO_BORDER);
            footer.setAlignment(Element.ALIGN_CENTER);

            PdfWriter.getInstance(document, out);

            // Fill the virtual PDF table with the necessary data
            generatePDFTable();
View Full Code Here

  Watermark watermark = new Watermark(image, doc.getPageSize().width()/2-imagePlanWidth/2-50, doc.getPageSize().height()/2+50-imagePlanHeigth/2);
  doc.add(watermark);
  */

  // trying to put in an header and a footer
  HeaderFooter header = new HeaderFooter(new Phrase("DIPTU - STAN"), false);
  HeaderFooter footer = new HeaderFooter(new Phrase("Page "), new Phrase(""));
  footer.setAlignment(Element.ALIGN_RIGHT);
  doc.setHeader(header);
  doc.setFooter(footer);

  // retriving data
  Data data = view.getDocumentData();
View Full Code Here

     * @throws IOException
     */
    public void writeHeadersFooters(ByteArrayOutputStream os) throws IOException {
        if (this.footer instanceof RtfHeaderFooters) {
            RtfHeaderFooters rtfHf = (RtfHeaderFooters) this.footer;
            HeaderFooter hf = rtfHf.get(RtfHeaderFooters.ALL_PAGES);
            if (hf != null) {
                writeHeaderFooter(hf, footerBegin, os);
            }
            hf = rtfHf.get(RtfHeaderFooters.LEFT_PAGES);
            if (hf != null) {
                writeHeaderFooter(hf, footerlBegin, os);
            }
            hf = rtfHf.get(RtfHeaderFooters.RIGHT_PAGES);
            if (hf != null) {
                writeHeaderFooter(hf, footerrBegin, os);
            }
            hf = rtfHf.get(RtfHeaderFooters.FIRST_PAGE);
            if (hf != null) {
                writeHeaderFooter(hf, footerfBegin, os);
            }
        } else {
            writeHeaderFooter(this.footer, footerBegin, os);
        }
        if (this.header instanceof RtfHeaderFooters) {
            RtfHeaderFooters rtfHf = (RtfHeaderFooters) this.header;
            HeaderFooter hf = rtfHf.get(RtfHeaderFooters.ALL_PAGES);
            if (hf != null) {
                writeHeaderFooter(hf, headerBegin, os);
            }
            hf = rtfHf.get(RtfHeaderFooters.LEFT_PAGES);
            if (hf != null) {
View Full Code Here

       after = defaultPhrase();
    }

    @Override
    public void encodeEnd(FacesContext context) throws IOException {       
        HeaderFooter header;
       
        if (after == null) {
            header = new HeaderFooter(before, false);
        } else {
            header = new HeaderFooter(before, after);
        }
       
        alignment = (String) valueBinding(context, "alignment", alignment);
        if (alignment != null) {
            header.setAlignment(ITextUtils.alignmentValue(alignment));
        }
       
        applyRectangleProperties(context, header);
       
        super.encodeEnd(context);
View Full Code Here

        return CountryList.countries;
    }

    public void preProcessPDF(Object document) {
        Document pdf = (Document) document;
        HeaderFooter footer = new HeaderFooter(new Phrase("This is page: "), true);
        pdf.setFooter(footer);
    }
View Full Code Here

            document.setHeader(new RtfHeaderFooter(header));
           
            // If the footer (or header) is to be the same for all Chapters
            // then it has to be set before the document is opened and is
            // then automatically set for all Chapters.
            document.setFooter(new HeaderFooter(new Phrase("This is page "), new Phrase(".")));
           
            document.open();
           
            Chapter chapter1 = new Chapter("Chapter 1", 1);
            chapter1.add(new Paragraph("This document has different headers and footers " +
View Full Code Here

            Table headerTable = new Table(3);
            headerTable.addCell("Test Cell 1");
            headerTable.addCell("Test Cell 2");
            headerTable.addCell("Test Cell 3");
            HeaderFooter header = new RtfHeaderFooter(headerTable);
            RtfHeaderFooterGroup footer = new RtfHeaderFooterGroup();
            footer
                    .setHeaderFooter(
                            new RtfHeaderFooter(new Phrase(
                                    "This is the footer on the title page")),
View Full Code Here

        return c;
    }

    public static HeaderFooter createFooter(String packageName) {
        HeaderFooter footer = new HeaderFooter( new Phrase( packageName + "-",
                                                            HEADER_FOOTER_TEXT ),
                                                true );
        footer.setBorder( 1 );
        footer.setAlignment( Element.ALIGN_RIGHT );

        return footer;
    }
View Full Code Here

TOP

Related Classes of com.lowagie.text.HeaderFooter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.