phantomjs icon indicating copy to clipboard operation
phantomjs copied to clipboard

Media print not rendered for PNG but works for PDF

Open zlannin opened this issue 11 years ago • 0 comments

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>

zlannin avatar Jul 14 '15 18:07 zlannin