aspose file tools*
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 JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "footer in itext how" Watch "footer in itext how" New topic
Author

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("-"));
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
Marshal

Joined: Mar 22, 2005
Posts: 42590
    
  65
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 footer..it's constructor doesnt take PdFPTable .i wonder how to add table to footer please.

Thanks a lot for your hint
Ulf Dittmer
Marshal

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

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

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
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: footer in itext how