This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 41133
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.

Ping & DNS - my free Android networking tools app
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: 41133
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: 3274

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.
It is sorta covered in the JavaRanch Style Guide.
subject: footer in itext how
Similar Threads
How to add image in the footer of PDF
Add footer using iText version 5
How do I get A Footer on the First Page of a PDF Document
Headers and Footers are not appearing in saved PDF
Inserting Image in a PDF File generated using JAVA PdfWriter object