I hope you are well.
I'm trying to write the following to a pdf using the fpdf2 library:
GHI (kWh $m^-2 day^{-1}$)
But I'm not getting the expected result, the text is written in the pdf in the same way as the code, that is: GHI (kWh $m^-2 day^{-1}$)
Here is a basic example:
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("helvetica", "B", 16)
pdf.cell(40, 10, r"GHI (kWh $m^-2 day^{-1}$)")
pdf.output("test.pdf")
Could someone let me know how I can write this text in the pdf so that it is rendered correctly?
Thank you very much in advance,
Robson