Does wkhtmltopdf mean css font color?

I use wkhtmltopdf to create the pdf page of the page, but it does not display any of the fonts in the correct color, they are all shown in black.

Color is defined as you expected:

.panel-dashboard p.stat { color: #bed000; } 

and displays correctly when viewed in a browser.

I call it

 wkhtmltopdf path/to/page filename 

Does wkhtmltopdf really display font colors incorrectly? I could not find any problems related to this.

+2
source share
2 answers

There is a problem with wkhtmltopdf 0.9.9, 0.11 correctly displays css font colors.

+2
source

Using version 0.12.2.4, working with a white font inside CSS (inside a gray background), but the color font (red, orange) did not execute:

 .header { background-color: #888; color: #fff; } /* works */ .orange { color: f80; } /* doesn't work in wkhtmltopdf */ 

Using the style directly in the div did the job:

 <div style="color:#f60;">My Orange Text</div> 

Maybe because there is no background? I dont know.

So if you try CSS and it doesn't work, this might work ...

0
source

All Articles