Footer on the last page

707 views
Skip to first unread message

zed

unread,
Jan 10, 2012, 5:16:33 AM1/10/12
to Flying Saucer Users
Hello,

My problem consits in having a specific and different footer only on
my last page.

I don't know when the last page begins : the document's content is
dynamic...

Had you got a solution for me please ?

Thanks you :-)

shaik sarpa

unread,
Jan 10, 2012, 11:50:34 AM1/10/12
to flying-sa...@googlegroups.com
Hi,

First generate the PDF with out Footer on the last page.

now you can edit the PDF and append Footer to the last page using itext api

Thanks,
Shaik,
--
Regards,
Sarpa Shaik

zed

unread,
Jan 10, 2012, 12:36:12 PM1/10/12
to Flying Saucer Users
Hi,

Thanks for your answer.

The height of footers are different : the height of the last footer is
larger than others.

So I am not sure to have enough space to write footer. Maybe I can add
a empty block with a height of footer at the end of the document...

I will try this solution.

Peter Brant

unread,
Jan 10, 2012, 12:40:47 PM1/10/12
to flying-sa...@googlegroups.com
A better solution would be to use a running element in combination
with named pages (to adjust the margin on the last page).

http://www.w3.org/TR/css3-gcpm/#running-elements

Just put your footer at the end of the document XML.

Pete

zed

unread,
Jan 11, 2012, 3:30:15 AM1/11/12
to Flying Saucer Users
Yes it would be better.

But how do I detect the last page ?

I don't know the first element of my last page, the content of
document is dynamic and the number of pages is not same.

Peter Brant

unread,
Jan 26, 2012, 7:48:53 AM1/26/12
to flying-sa...@googlegroups.com
I don't think you need to. Just put the footer at the end of the document.

Pete

Reply all
Reply to author
Forward
0 new messages