
Originally Posted by
domkat
It would be nice to know if there is any other solution to this.
You should be able to do this overriding the AbstractPdfView.buildPdfMetadata() method I think. The javadoc and method name could possibly be improved, but you get the Document object as a parameter before the document.open() method is called so the following (untested, taken from the iText docs) should work:
Code:
protected void buildPdfMetadata(Map model, Document document, HttpServletRequest request) {
HeaderFooter header = new HeaderFooter(new Phrase("This is a header."), false);
HeaderFooter footer = new HeaderFooter(new Phrase("This is page "), new Phrase("."));
document.setHeader(header);
document.setFooter(footer);
}
Regards,