Node-html-pdf: text color problem

Created on 28 Jul 2015  路  9Comments  路  Source: marcbachmann/node-html-pdf

when setting the color of text , it shows always black

example :

Text Goes Here

Most helpful comment

@media print {} is not working here.

All 9 comments

Hi, it seems that it's working if you place you're styles within the HTML document ( http://share.pho.to/9c6C6 )

its not working! tried style within html and inline style

if you are using bootstrap CSS, phantomjs applies the @media print styles which make everything black & white.

I had the same issue, the problem was relative paths!
Maybe its possible to solve this set DocumentRoot with the directory option? I haven't tried it because I'd prefer to solve by including the complete stylesheet with <style> Tags.

Had the same issue, just put !important and it is working great !

Example :

.myClass {
    color: #123456 !important;
}

Regards
F.

@dragma Don't use !important, your stylesheet will become a mess. Just use

@media print {
    .myclass { color: red; }
}

@dotmagic Thanks a lot for the trick ! :)

@media print {} is not working here.

@media print {} works like a charm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hishamabutt picture hishamabutt  路  4Comments

wobsoriano picture wobsoriano  路  3Comments

anmolgoyal74 picture anmolgoyal74  路  4Comments

Messilimeng picture Messilimeng  路  4Comments

vivekiyer114 picture vivekiyer114  路  5Comments