/** * Changes the footer of this document. * * @param footer the new footer */ public void setFooter(HeaderFooter footer) { if (writer != null && writer.isPaused()) { return; } super.setFooter(footer); }
/** * Changes the footer of this document. * * @param footer the new footer */ public void setFooter(HeaderFooter footer) { if (writer != null && writer.isPaused()) { return; } super.setFooter(footer); }
/** * Changes the footer of this document. * * @param footer the new footer */ public void setFooter(HeaderFooter footer) { if (writer != null && writer.isPaused()) { return; } super.setFooter(footer); }
@Override public void handleHeaderFooter(HeaderFooter footer) { Document document = findDocument(); if (document == null) { throw new RuntimeException("cannot locate document object"); } findDocument().setFooter(footer); } }
public static void setFooterOnDocument( Document document, String footerText, Font font ) { boolean isNumbered = true; HeaderFooter footer = new HeaderFooter( new Phrase( footerText, font ), isNumbered ); footer.setBorder( Rectangle.NO_BORDER ); footer.setAlignment( Element.ALIGN_RIGHT ); document.setFooter( footer ); }
/** * @see org.displaytag.export.BinaryExportView#doExport(OutputStream) */ public void doExport(OutputStream out) throws JspException { try { // Initialize the table with the appropriate number of columns 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(); document.open(); document.setFooter(footer); document.add(this.tablePDF); document.close(); } catch (Exception e) { throw new PdfGenerationException(e); } }