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

added basic support for Free Text annotations #1039

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

MarekT0v
Copy link

@MarekT0v MarekT0v commented Nov 28, 2023

#949
Currently it supports basic Free Text annotations.
"Basic"> Meaning, that one can't set annotation's color, font or font size. These are set by default now to black color, Helvetica, 12.

Checklist:

  • 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.

@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (bc44876) 93.58% compared to head (71a009f) 93.57%.
Report is 2 commits behind head on master.

❗ Current head 71a009f differs from pull request most recent head 3e5c15c. Consider uploading reports for the commit 3e5c15c to get more accurate results

Files Patch % Lines
fpdf/fpdf.py 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1039      +/-   ##
==========================================
- Coverage   93.58%   93.57%   -0.02%     
==========================================
  Files          29       29              
  Lines        8514     8530      +16     
  Branches     1566     1572       +6     
==========================================
+ Hits         7968     7982      +14     
- Misses        338      339       +1     
- Partials      208      209       +1     

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

@Lucas-C
Copy link
Member

Lucas-C commented Nov 29, 2023

This is promising!
Good job @MarekT0v 👍

black & pylint both validate your PR 😊

Have you checked that those Free Text annotations are visible when using a PDF reader?
If so, could share a screenshot please?

What remains to be done in order for this PR to be complete and that we merge it:

fpdf/annotations.py Outdated Show resolved Hide resolved
@MarekT0v
Copy link
Author

MarekT0v commented Dec 2, 2023

Thank you @andersonhc, your review helped me a lot. I implemented the changes in the way as you suggested. Color, font and size can be now set for free text annotations.

@MarekT0v MarekT0v marked this pull request as ready for review December 2, 2023 20:33
fpdf/fpdf.py Outdated Show resolved Hide resolved
@Lucas-C
Copy link
Member

Lucas-C commented Dec 4, 2023

I made a single review comment.
Apart from that, I think this PR is ready to be merged.

@allcontributors please add @MarekT0v for code

Copy link

@Lucas-C

I've put up a pull request to add @MarekT0v! 🎉

fpdf/fpdf.py Show resolved Hide resolved
@Lucas-C Lucas-C merged commit 2e5a567 into py-pdf:master Dec 5, 2023
8 checks passed
@Lucas-C
Copy link
Member

Lucas-C commented Dec 5, 2023

Merged!

Thank you very much for your contribution @MarekT0v 👍

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.

4 participants