File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes footer in itext how Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "footer in itext how" Watch "footer in itext how" New topic

footer in itext how

hani Ibrahim
Ranch Hand

Joined: Sep 06, 2006
Posts: 182
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("-"));
i dont find anything help me to have control for adding anything to this is just show for me number of page.

Please any help
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
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

Joined: Sep 06, 2006
Posts: 182
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's constructor doesnt take PdFPTable .i wonder how to add table to footer please.

Thanks a lot for your hint
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Footers really aren't meant for complicated objects like tables, so I don't think this is possible.
Arunkumar Subramaniam

Joined: Apr 08, 2009
Posts: 8
how to draw a line in a footer using itext...
camila kino

Joined: Nov 05, 2009
Posts: 1
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

Joined: Jun 24, 2003
Posts: 3275

brazilian java coder, please see you PM for an important admin message.

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Consider Paul's rocket mass heater.
subject: footer in itext how
jQuery in Action, 3rd edition