Create a PDF file

Report a typo

Organize the following lines to create a sample PDF document. Remember that before printing text or a cell, it is mandatory to select a font, otherwise, the document would be invalid.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                pdf.add_page()
              
                pdf.cell(40, 10, 'This is my first document')
              
                pdf.output('dummy.pdf')
              
                pdf.set_font('times', 'B', 16)
              
                pdf = FPDF()
              
                from fpdf import FPDF
              
___

Create a free account to access the full topic