Hi, i use the following code to place a table with images as a page footer,
the header gets placed in the right place, but the footer goes to the same
place as the header (top of the page)...
Does anyone knows why this behaviour occurrs?:...
PdfPTable header = new PdfPTable(2);
PdfPCell cell = new PdfPCell(img);
cell.setBorderColor(new Color(255, 255, 255));
header.addCell(cell);
String titsub= "";
if(titulo != null) {
titsub = titulo;
if(stitulo != null)
titsub += "\n" + stitulo;
cell = new PdfPCell(new Paragraph(titsub));
cell.setBorderColor(new Color(255, 255, 255));
header.addCell(cell);
//doc.add(header);
}
Phrase p = new Phrase();
p.add(header);
HeaderFooter f = new HeaderFooter(p, false);
f.setBorder(0);
f.setAlignment(Paragraph.ALIGN_CENTER);
doc.setHeader(f);
PdfPTable footer = new PdfPTable(4);
//footer.setBorder(0);
//footer.setWidth(100);
com.lowagie.text.Image feder =
com.lowagie.text.Image.getInstance("http://localhost:8888/mapviewer/valimar-digital/imgs/icone_feder.gif");
feder.scalePercent(50);
cell = new PdfPCell(feder);
cell.setBorderColor(new Color(255, 255, 255));
footer.addCell(cell);
com.lowagie.text.Image posc =
com.lowagie.text.Image.getInstance("http://localhost:8888/mapviewer/valimar-digital/imgs/icone_pos_conhecimento.gif");
posc.scalePercent(50);
cell = new PdfPCell(posc);
cell.setBorderColor(new Color(255, 255, 255));
footer.addCell(cell);
com.lowagie.text.Image valimar =
com.lowagie.text.Image.getInstance("http://localhost:8888/mapviewer/valimar-digital/imgs/valimar_mini_logo.gif");
valimar.scalePercent(50);
cell = new PdfPCell(valimar);
cell.setBorderColor(new Color(255, 255, 255));
footer.addCell(cell);
com.lowagie.text.Image itext =
com.lowagie.text.Image.getInstance("http://localhost:8888/mapviewer/valimar-digital/imgs/iText_logo.gif");
itext.scalePercent(50);
cell = new PdfPCell(itext);
cell.setBorderColor(new Color(255, 255, 255));
footer.addCell(cell);
p = new Phrase();
p.add(footer);
f = new HeaderFooter(p, false);
f.setBorder(0);
f.setAlignment(Paragraph.ALIGN_CENTER);
doc.setFooter(f);
Thanks in advance
--
View this message in context:
http://www.nabble.com/Footer-placed-on-page-header-tp18788260p18788260.html
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php