phantomjs
phantomjs copied to clipboard
Media print not rendered for PNG but works for PDF
If you run the following through the rasterize.js with PNG the bottom div displays, but for PDFs it's hidden.
<html>
<style type="text/css" media="print">
#div1 {
height: 200px;
width: 500px;
background-color: blue;
}
#div2 {
height: 200px;
width: 500px;
background-color: red;
}
@media print {
.noprint {
display: none;
}
}
</style>
<body>
<div id="div1">This is a blue div</div>
<div id="div2">This is a red div</div>
<div class="noprint">This should not show</div>
</body>
</html>