Witold Budzynski
Witold Budzynski

Reputation: 39

Preview HTML divided by pages before print

I need to make own preview print page (like google docs editor), before convert html to pdf, like this: http://welcome.totheinter.net/autocolumn/sample10.html

After print or convert example page to pdf i would like this same effect (with this same header and footer, margins, fonts, sizes,...)

How to switch off browser header, footer and set ideal as preview page apperance with any web browser?

Upvotes: 2

Views: 1182

Answers (1)

Victor Levin
Victor Levin

Reputation: 1177

Firstly, you can't switch off browsers' print header and footer on the client side (in Javascript) If you're converting this to PDF then PDF printer has to be configured to turn off headers and footers.

Secondly if you want page breaks, add this CSS:

@media print{
   .page{
      page-break-after:always;
   } 
}

Upvotes: 2

Related Questions