Replies: 1 comment
-
Hi @inzeos In the next release of from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("Helvetica", size=12)
with pdf.table(col_widths=60, first_row_as_headings=False, min_row_height=96.52, v_align="TOP") as table:
row = table.row()
row.cell("A")
row.cell("B")
row.cell("C")
row = table.row()
row.cell("D")
row.cell("E")
row.cell("F")
pdf.output("discuss_1345.pdf") For now, with version 2.8.2 of from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_font("Helvetica", size=12)
with pdf.table(col_widths=60, first_row_as_headings=False, v_align="TOP") as table:
row = table.row()
row.cell("A" + "\n" * 6)
row.cell("B")
row.cell("C")
row = table.row()
row.cell("D" + "\n" * 8)
row.cell("E")
row.cell("F")
pdf.output("discuss_1345.pdf") |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My goal is to create a PDF with set width and column height. Each cell will only have a few single words aligned top and to the left.
I'm close but I'm missing something or misunderstanding a concept.
The below code is producing a PDF close to what I'm after; however, the text in each cell is vertically aligned in the middle and to the left, not vertically aligned to the top and left.
Beta Was this translation helpful? Give feedback.
All reactions