from fpdf import FPDF
import traceback

pdf = FPDF()
pdf.add_page()
html_c = "<b>Test</b>"
try:
    pdf.write_html(f'<font color="#334155" face="helvetica" size="7">{html_c}</font>')
    print("HTML success")
except Exception as e:
    print("HTML exception:")
    traceback.print_exc()

