Skip to content

Problems with the write_html function when changing the color of heading elements #880

Answered by Lucas-C
liviaalvzs asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @liviaalvzs!

Thank you for getting in touch.

You are right, this currently a limitation of fpdf2 HTML renderer.
The headings color is hardcoded & set there:
https://github.com/py-pdf/fpdf2/blob/2.7.5/fpdf/html.py#L386

I just merged a PR that adds support for this: #886

While waiting for a new fpdf2 release including this feature,
you can already test it by installing fpdf2 from git:

pip install git+https://github.com/py-pdf/fpdf2.git@master

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@liviaalvzs
Comment options

Answer selected by Lucas-C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants