Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table header override style is not working #1058

Closed
faxioman opened this issue Dec 7, 2023 · 4 comments
Closed

Table header override style is not working #1058

faxioman opened this issue Dec 7, 2023 · 4 comments

Comments

@faxioman
Copy link

faxioman commented Dec 7, 2023

Hi,
using this example from docs:

headings_style = FontFace(emphasis="ITALICS", color=blue, fill_color=grey)
override_style = FontFace(emphasis="BOLD")
with pdf.table(headings_style=headings_style) as table:
    headings = table.row()
    headings.cell("First name", style=override_style)
    headings.cell("Last name", style=override_style)
    headings.cell("Age")
    headings.cell("City")

You can see that the header override is not working.
I'm using fpdf2 version 2.7.6 with python 3.10.

@faxioman faxioman added the bug label Dec 7, 2023
@Lucas-C
Copy link
Member

Lucas-C commented Dec 7, 2023

I have juste tested your code snippet, and the style override works perfectly well.
We fixed that a few days/weeks ago: https://github.com/py-pdf/fpdf2/blob/master/CHANGELOG.md#277---not-released-yet

You can verify this by installing the latest version of fpdf2 from this repo master branch:

pip install git+https://github.com/py-pdf/fpdf2.git@master

Can you confirm that you problem disappear using the latest version? 🙂

@faxioman
Copy link
Author

faxioman commented Dec 7, 2023

Hey @Lucas-C, with the development version, heading override works perfectly, even with multi-line headings. Fantastic! I apologize, I could have actually tested it first on the master branch 🙏

@faxioman faxioman closed this as completed Dec 7, 2023
@Lucas-C
Copy link
Member

Lucas-C commented Dec 8, 2023

No worries @faxioman 😊

FYI, we are planning on performing a new release very soon

@Lucas-C
Copy link
Member

Lucas-C commented Dec 10, 2023

New release: https://github.com/py-pdf/fpdf2/releases/tag/2.7.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants