wkhtmltopdf 是否尊重 css 字体颜色? [英] Does wkhtmltopdf respect css font color?

查看:44
本文介绍了wkhtmltopdf 是否尊重 css 字体颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wkhtmltopdf 生成页面的 pdf,但它没有以正确的颜色显示任何字体,它们都显示为黑色.

I'm using wkhtmltopdf to generate a pdf of a page but it doesn't display any of the fonts in the correct colour, they all are presented black.

颜色按照您的预期定义:

The colour is defined as you'd expect:

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

并在浏览器中正确显示.

and displays correctly when viewed in the browser.

我称之为

wkhtmltopdf path/to/page filename

wkhtmltopdf 只是不能正确呈现字体颜色吗?我找不到与此相关的任何问题.

Does wkhtmltopdf just not render font colours correctly? I've not been able to find any issues relating to this.

推荐答案

看来这是 wkhtmltopdf 0.9.9、0.11 正确呈现 css 字体颜色的问题.

Appears this was a problem with wkhtmltopdf 0.9.9, 0.11 renders css font colors correctly.

这篇关于wkhtmltopdf 是否尊重 css 字体颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆