I can’t set X axis position for display pdf.table, only Y axis works using set_y(). When i use set_x() nothing happens or set_xy() only Y axis parameter works.
Theres a way to position a table in any page place?
from fpdf import FPDF
data = (
("First name", "Last name", "Age", "City"),
("Jules", "Smith", "34", "San Juan"),
("Mary", "Ramos", "45", "Orlando"),
("Carlson", "Banks", "19", "Los Angeles"),
("Lucas", "Cimon", "31", "Saint-Mathurin-sur-Loire"),
)
pdf = FPDF()
pdf.set_font("helvetica", size=8)
pdf.add_page()
pdf.set_xy(230, 80) <------------------------ HERE, ONLY Y AXIS WORKS
with pdf.table(
line_height=6,
width=60
) as table:
for data_row in data:
row = table.row()
for datum in data_row:
row.cell(datum)
pdf.output("tuto5.pdf")