diff --git a/020-xmp/main.py b/020-xmp/main.py index c00b9ce..b143281 100644 --- a/020-xmp/main.py +++ b/020-xmp/main.py @@ -9,7 +9,7 @@ pdf = FPDF() pdf.add_page() pdf.set_font("Helvetica", size=12) -pdf.cell(200, 10, txt="Hello, World!", ln=1, align="C") +pdf.cell(200, 10, text="Hello, World!", align="C", new_x="LMARGIN", new_y="NEXT") pdf.output(name=output) output.seek(0) diff --git a/024-annotations/create_annotated_pdf.py b/024-annotations/create_annotated_pdf.py index 38c7cce..92912cf 100644 --- a/024-annotations/create_annotated_pdf.py +++ b/024-annotations/create_annotated_pdf.py @@ -11,7 +11,7 @@ pdf.add_page() pdf.set_font("Helvetica", size=24) -pdf.text(x=10, y=20, txt="Some text.") +pdf.text(x=10, y=20, text="Some text.") pdf.text_annotation( x=60, y=20, @@ -21,8 +21,8 @@ with pdf.highlight("Highlight comment"): pdf.text(50, 50, "Line 1") pdf.set_y(50) - pdf.multi_cell(w=30, txt="Line 2") -pdf.cell(w=60, txt="Not highlighted", border=1) + pdf.multi_cell(w=30, text="Line 2") +pdf.cell(w=60, text="Not highlighted", border=1) pdf.ink_annotation(