Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add header and footer to dynamically generated page for print

 
amitava guha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to create an application print page. The content of the application is dynamic, for example you can add multiple addresses or personal details. So the page lengths are not static. I need to place a header with application number and footer with page number in page x of y format. How can I place the header and footer dynamically?

Any help will be appreciated.

Regards,
Amit
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this for a web app or a desktop app?
 
amitava guha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is for a web application. I am using JSP pages with Struts framework in J2EE.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the printer already puts page X of Y on the page. Not sure why you need to repeat that.

To do it with html/css, it will only really work with browsers that support CSS3 which is not that many.

It normally is better to create a pdf file on the server and make it look pretty that way.

Eric
 
amitava guha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks for reply,
Well a PDF file would have been a better choice, but we started with assumption of giving a simple html print only.
The page X Of Y can be resolved by setting [&p Of &P] in the print setup. But still we need to give a header which is a number generated in the code.

Any solution?
 
amitava guha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No solution?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic