Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

footer in itext how

 
hani Ibrahim
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
i want to add Footer to my pdf file in every page for example:
"Copyright � 2008. All rights reserved "
i use this code :
PdfWriter writer = PdfWriter.getInstance(document, this.pdfArray);
HeaderFooter footer = new HeaderFooter(new Phrase("-"), new Phrase("-"));
footer.setAlignment(Element.ALIGN_CENTER);
document.setFooter(footer)
i dont find anything help me to have control for adding anything to this footer..it is just show for me number of page.


Please any help
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want a page number then you shouldn't use the HeaderFooter (Phrase, Phrase) constructor. Use the HeaderFooter (Phrase, boolean) constructor and pass false for the boolean.
 
hani Ibrahim
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot it is worked perfectly i added the "copy right sentence" i appreciate your response.but would you please tell me how to add table to the footer..it's constructor doesnt take PdFPTable .i wonder how to add table to footer please.

Thanks a lot for your hint
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Footers really aren't meant for complicated objects like tables, so I don't think this is possible.
 
Arunkumar Subramaniam
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to draw a line in a footer using itext...
 
camila kino
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table in the header, so i guess it's also possible in the footer.



Table in Header example


Simple header with line example

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
brazilian java coder, please see you PM for an important admin message.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic