3

I have a HTML page which is a report. When I use printing function (Ctrl+P), it is 10 pages long. I want to display a watermark for each page.

Anybody has suggestion? Thanks.

Kelvin
  • 51
  • 5

2 Answers2

3

Use a print stylesheet combined with css fixed positioning to repeat the watermark on each page.

@media print { … }

Etienne Martin
  • 10,018
  • 3
  • 35
  • 47
2

You can use a print styles sheet to add some extra styling (and watermark). it can be a bit tricky on getting it to work with it repeating the watermark across each page. You can view some more information here: http://www.andypemberton.com/css/print-watermarks-with-css/

Typically with reports I tend to use another tool that converts the page into a pdf such as wkhtmltopdf (http://wkhtmltopdf.org/) or PDFtk (https://www.pdflabs.com/docs/pdftk-man-page/). It allows you to input various settings to include watermarks, cover pages, table of contents and even page numbers.

Aaron Vanston
  • 755
  • 7
  • 19
  • Thanks for your link http://www.andypemberton.com/css/print-watermarks-with-css/ It's working exellent on Firefox, but this doesn't support on Chrome – Kelvin Feb 04 '15 at 03:50