Custom firstpage and last page together

adamodar

adamodar

Active Member
Hi Guys,

I have a requirement where I need to print a custom header on my first page, print a continued on next page on all the pages including the first page but excluding the last page.

For this:
a) I created a custom 'diff first page' template,
b) placed the first page header in that,
c) created a <?start:body?>Content1<end body>Next-Page-Footer, to print footers on all pages except for the last page,
d) created a section break - new page,
e) created a <?start@last-page-first:body?>Content1<end body> diff-footer

But whem I run this, I'm facing the below issues:

a) Next-page-footer is getting printed only on first page
b) When there is only one page,
the header is not getting printed though I had used a section break before <?start@last-page-first:body?>

Please suggest how I should go ahead.

I'm also attaching a copy of my template for your better understanding.
 

Attachments

  • 174044-R5900208_Beta0.zip
    14.9 KB · Views: 184
Hi Arjun

You don't need to combine Word headers and footers with <?start:body? and <?end body?>. I suggest you use either one or the other. My preference is to use just Word headers and footers, as that gives you the ability to use different first page headers/footers, and different odd/even.

I also don't like using <?start@last-page-first:body?>, if you've got different first page headers and footers. As you've discovered, it causes problems when you've only got one page. If your design permits it, just leave the second page blank, other than the headers and footers, and let the table from the first page populate it. Don't forget to get rid of your section break as well, although you'll need to temporarily add a regular page break so that you can define your second page headers and footers.

Also, you might find it useful to take a look at this article for printing a 'Continued' at the bottom of each page:

http://blogs.oracle.com/xmlpublisher/entry/continued

It makes use of an undocumented command <font color="blue"><?table-footer:?></font> to specify that a table row should be displayed at the bottom of the table, including whenever there is a page break.

Hope that helps,
Dave
 
I have a problem like you too but I want show footer at last page, but my header have different layout at first page...any suggestion...thank
 
<font color="blue"><?table-footer:?></font> will do the magic.. I'll test and let you know..
And regarding printing a footer on last page only, generate an empty <font color="blue"><?start@last-page:body?><?end body?></font> tag and place the footer after that.. What happens is, this tag will be called only at the last page and after which the footer will be generated, hence the footer will be printed just once.. hope this helps..
 
Back
Top