Examples of HeaderFooter


Examples of com.lowagie.text.HeaderFooter

    //TODO aSubject.append(itsVersion);
    // aSubject.append(" - ");
    aSubject.append(getDateTime());
    theDocument.addSubject(aSubject.toString());
    //TODO in footer?
    HeaderFooter aHeader = new HeaderFooter(
        new Phrase(aSubject.toString()), false);
    //    aHeader.setBorder(Rectangle.NO_BORDER);
    // aDocument.setHeader(aHeader);
    HeaderFooter aFooter = new HeaderFooter(new Phrase(), true);
    aFooter.setAlignment(HeaderFooter.ALIGN_RIGHT);
    aFooter.setBorder(Rectangle.NO_BORDER);
    theDocument.setFooter(aFooter);

    theDocument.open();

    theDocument.add(new Phrase(itsTitle, FontFactory.getFont(
View Full Code Here

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

Examples of com.lowagie.text.HeaderFooter

            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

Examples of com.lowagie.text.HeaderFooter

            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

Examples of com.lowagie.text.HeaderFooter

  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

Examples of com.lowagie.text.HeaderFooter

     * @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

Examples of com.lowagie.text.HeaderFooter

       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

Examples of com.lowagie.text.HeaderFooter

        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

Examples of com.lowagie.text.HeaderFooter

            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

Examples of com.lowagie.text.HeaderFooter

            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
TOP
Copyright © 2018 www.massapi.com. 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.