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

Draft: page label feature #1188

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

andersonhc
Copy link
Collaborator

@andersonhc andersonhc commented May 30, 2024

Implements "Page label" feature in fpdf2.

Checklist:

  • Implement page label

  • Create method to read page labels if the user wants to use on header, footer, etc.

  • Add option on TOC to list page labels instead of page number

  • The GitHub pipeline is OK (green),
    meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.

  • A unit test is covering the code added / modified by this PR

  • This PR is ready to be merged

  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A mention of the change is present in CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

@andersonhc andersonhc self-assigned this May 30, 2024
fpdf/fpdf.py Outdated Show resolved Hide resolved
Comment on lines +871 to +873
label_style=None,
label_prefix=None,
label_start=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder that in the end, some doctring should be added for those 🙂

@Lucas-C Lucas-C changed the title (Draft) page label feature Draft: page label feature Jun 12, 2024
@Lucas-C
Copy link
Member

Lucas-C commented Jun 12, 2024

This is really promising, good job @andersonhc 👍 🙂

@Lucas-C Lucas-C marked this pull request as draft June 13, 2024 05:49
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 67.88991% with 35 lines in your changes missing coverage. Please review.

Project coverage is 92.96%. Comparing base (2b866d8) to head (56aa6c9).
Report is 27 commits behind head on master.

Current head 56aa6c9 differs from pull request most recent head d1346c6

Please upload reports for the commit d1346c6 to get more accurate results.

Files Patch % Lines
fpdf/fpdf.py 44.44% 25 Missing ⚠️
fpdf/output.py 81.08% 5 Missing and 2 partials ⚠️
fpdf/util.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1188      +/-   ##
==========================================
- Coverage   93.25%   92.96%   -0.29%     
==========================================
  Files          30       31       +1     
  Lines        9253     9699     +446     
  Branches     2104     2171      +67     
==========================================
+ Hits         8629     9017     +388     
- Misses        385      432      +47     
- Partials      239      250      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

3 participants