Why won\'t this work :
with open(\'file.pdf\', \'w\') as outfile: outfile.write(\"Hello\")
The code works fine, but the .pdf file cann
you could install the fpdf library and then:
from fpdf import FPDF pdf = FPDF() pdf.add_page() pdf.set_xy(0, 0) pdf.set_font('arial', 'B', 13.0) pdf.cell(ln=0, h=5.0, align='L', w=0, txt="Hello", border=0) pdf.output('test.pdf', 'F')