window.print() is not printing the whole page

you should use a separate css file for printing the page or use css3 media queries:

<link rel="stylesheet" href="https://stackoverflow.com/questions/10845621/css/print.css" type="text/css" media="print"/>

using percentage values its the best option when you create a css print file.

body, html, #wrapper {
    width: 100%;
}

or in your main css file:

@media print {
      body, html, #wrapper {
          width: 100%;
      }
}

Leave a Comment