Skip to content

Commit

Permalink
use cell_fill_mode (#879)
Browse files Browse the repository at this point in the history
  • Loading branch information
jankobler authored Aug 11, 2023
1 parent 2b03836 commit f25f916
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 f25f916

Please sign in to comment.