IText - Header / Footer

Dae,

alguma alma caridosa :lol: por acaso teria um exemplo de código que gere PDFs no IText com Headers e Footers mais complexos?
Na verdade eu já consigo fazer o básico, mas vou precisar dar uma afrescalhada nos relatórios aqui da minha empresa.

Brigadão,
Marcelo

Esse é um cabeçalho que possui imagem e tabela

Phrase p = new Phrase();
Table t = new Table(2, 1);
t.setWidth(100);
float[] widths = {10, 90};
t.setWidths(widths);
t.setBorderWidth(0);
t.setBorderColor(new Color(0, 0, 0));

Image gif = null;
try {
//URL url = this.servletContext.getContext("/").getResource("/imagens/logo.gif");
URL url = this.servletContext.getResource("/imagens/logo.gif");
if (url != null) {
gif = Image.getInstance(url);
}
}
catch (IOException ioe) {
throw new DocumentException(ioe.getMessage());
}
if (gif != null) {
gif.scaleAbsolute(40, 54);
gif.setAlignment(Image.RIGHT);
Chunk ck = new Chunk(gif, 0, -40);
Cell c1 = new Cell();
c1.add(ck);
c1.setBorderWidth(0);
t.addCell(c1);
}
else {
Cell c1 = new Cell();
c1.add(new Phrase());
c1.setBorderWidth(0);
t.addCell(c1);
}
// this.CABECALHO
Cell c2 = new Cell(new Phrase(this.CABECALHO, new ont(Font.HELVETICA, 10, Font.BOLD, new Color(0, 0, 0))));
c2.setHorizontalAlignment(Cell.ALIGN_LEFT);
c2.setBorderWidth(0);
t.addCell(c2);

p.clear();
p.add(t);

HeaderFooter header = new HeaderFooter(p, false);

header.setBorder(Rectangle.NO_BORDER);
document.setHeader(header);

Dae Bin Laden,

pow, valeu a intenção, mas eu to estudando uma outra maneira de criar o Header e o Footer, utilizando templates.
Esta outra forma tem bem mais recursos.
O problema é q é BEEEEEEEEEEM chatinha também.
Mas de qualquer maneira brigadão ae!

T+,
Leiras