reportlab:ValueError:无效的颜色值'<css function:mozlineargradient(left,#ef6059,#fffd6c)>'

2024-05-16 06:39:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用xhtml2pdf从html生成pdf,当针对我的html文件运行脚本时,脚本将退出以下行:

return toColor(value, default) # Calling the reportlab function
  File "/usr/local/lib/python2.7/site-packages/reportlab/lib/colors.py", line 850, in __call__
    raise ValueError('Invalid color value %r' % arg)
ValueError: Invalid color value '<css function: moz-linear-gradient(left, #ef6059, #fffd6c)>'

有什么想法吗?在


Tags: 文件脚本defaultreturnpdfvaluelibhtml