javascript - Chrome window.print() missing page elements -


i having issue chrome (47.0.2526.111, os x) not rendering whole page both in preview , when printed when using button, onclick=window.print() event.

certain elements not rendered, such paragraph blocks , images.

this issue not replicated in other browser, , oddly enough appeared once added print button, , behaviour not observable when using ctrl+p or in chrome print stylesheet media emulation.

the issue seems temperamental, if have rendered print view via ctrl+p able go , use print button elements rendering.

use separate print.css file media="print":

<link rel="stylesheet"  type="text/css" href="path/to/print.css" media="print"> 

in media queries:

@media print{     div.print{       width: 100%;     } } 

Comments