Discussion Locked

Header on each page while printing HTML

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

We are facing problem in reports during print mode. Currently, we are printing all the pages of a report in one HTML page. (So, user can select Print option to print the full report) The requirement is, we have to print header (Report Name and Column Headers) and footer on each page.

How to do this? How to find out user's paper size and place the header/footer on perfect location in generated HTML page?

Thanks in advance,

Manish Solanki

6 replies

by nesdet

One way I have known this to be done is by:

  1. Having the user select from a list of page sizes,
  2. Calculating the number of lines per page (8.5" x 11" => 66 lines per page),
  3. Subtracting a standard number of lines for the header (e.g. 6) and for the footer (e.g. 3) and printing the remaining number of lines between each header and footer.

by nesdet

Please excuse the HTML code, I thought it would be translated in the process.

Another way is to import the text into a WORD document with a standard header and footer, and translating the entire document to HTML.

by manish_solanki

Thanks for your answer. I am printing reports from .java classes OR from JSP/Servlet files reading data from database. It's online process. The problem is, How can you say 66 lines per page? It's totaly depends on the font size. Also, the font size depends on User's browser setting too. (With View -> TextSize in IE). In my report there are many different fonts and sizes have been used. Also, my report could be more than 1000 pages.

Thanks.

by james_randy

Since you haven't received an acceptable answer in 10 months, perhaps you can now simply upgrade to all the latest versions and updates of all hardware and software, making your original problem a moot point.

Regards,

jr

This discussion is closed to new replies.