multi_cell string part(sub-string) make bold or add colors... #617
-
If we want to make a part of a string(sub string) in multi_cell as bold italic or something also for highlighting purpose i may want to use some colors, Is there any way for doing this ? As documentation is not updated with any such conditions.......... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Regarding colors, this is not currently possible with pdf.write_html("<font color="#00ff00"><p>hello in green</p></font>") |
Beta Was this translation helpful? Give feedback.
Hi @akash-exactspace
FPDF.multi_cell()
has amarkdown
parameter that can be set toTrue
to allow setting **bold** or __italic__ text: https://pyfpdf.github.io/fpdf2/fpdf/fpdf.html#fpdf.fpdf.FPDF.multi_cellRegarding colors, this is not currently possible with
multi_cell()
, but you can useFPDF.write_html()
: https://pyfpdf.github.io/fpdf2/HTML.html