Skip to content

Commit

Permalink
use cell_fill_mode
Browse files Browse the repository at this point in the history
cell_fill_logic is no longer an argument of Table

see https://py-pdf.github.io/fpdf2/fpdf/table.html#fpdf.table.Table

Signed-off-by: Jan Kobler <[email protected]>
  • Loading branch information
jankobler committed Aug 9, 2023
1 parent 2b03836 commit d5764f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tutorial/tuto5.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import csv
from fpdf import FPDF
from fpdf.fonts import FontFace
from fpdf.enums import TableCellFillMode


with open("countries.txt", encoding="utf8") as csv_file:
Expand All @@ -25,7 +26,7 @@
with pdf.table(
borders_layout="NO_HORIZONTAL_LINES",
cell_fill_color=(224, 235, 255),
cell_fill_logic=lambda i, j: i % 2,
cell_fill_mode=TableCellFillMode.ROWS,
col_widths=(42, 39, 35, 42),
headings_style=headings_style,
line_height=6,
Expand Down

0 comments on commit d5764f7

Please sign in to comment.