I build a Xpage application through Lotus designer 9 . I have a header through CSS which prints at each page while printing. I want to add page number of each page at header in this format (i.e. Page 1 of 6 ) can any one guide ?
Asked
Active
Viewed 177 times
2
-
Maybe this will work better. Take a look at http://stackoverflow.com/a/20317775 – Jesper Kiaer Feb 02 '17 at 14:03
-
Thanks @Jesper , the link is useful – Sidrah Feb 03 '17 at 05:37
-
Can some one fix my problem . counter(pages) always returns 0 at every page – Sidrah Feb 03 '17 at 05:37
2 Answers
5
Try this CSS:
@page {
@top-center {
content: 'Page ' counter(page) ' of ' counter(pages);
}
}

Per Henrik Lausten
- 21,331
- 3
- 29
- 76
0
HTML printing in a browser is a PITA. If you want to get quality output, you might consider to generate some PDF that users can print. It's a lot more work, but gives you 100% control how the print will look like.
You can check my blog series on Domino and PDF to get a head start.
Short of that Per's & Eric's answer is the way to go

stwissel
- 20,110
- 6
- 54
- 101