-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add-Annotation fontsize/color not working #2084
Comments
Quick Info: |
I've got the same issue so am following. -- |
Any update on this matter? @kang0410 for me it's not related to default viewer as I am not even using the preview-app. |
@Fellow-Bennse - Strange, have you tried opening the document in Acrobat reader (both after the stamp/annotation and after the other library to create an image) |
@kang0410 Yea I did, and the annotations are missing Font-Size and Font-Color |
I would really appreciate it if it could be looked into.. |
I cannot help you with the issue itself, but providing mostly minimal, but executable code as well as a simple PDF showing your issue usually makes it much easier to work on such issues (for now, one has to figure out how to actually call your code before doing actual debugging). Additionally, |
@stefan6419846 Showing the issue is a little hard when the annotations font-color is the same as border-color, meaning if I set Border-color to ffffff (white), I am also unable to see the text) As for font-size it's kinda the same thing. If I put it 50, it's still default-size from the library, hard to like, you know, properly show it. As for executable code:
|
I have the exact same issue. |
I have the same problem: font_color is ignored in favor of border_color, and font_size is completely ignored. |
Maybe as a reproducible error @stefan6419846 , one can just look at the documentation https://pypdf.readthedocs.io/en/latest/user/adding-pdf-annotations.html#free-text where the snippet # Create the annotation and add it
annotation = FreeText(
text="Hello World\nThis is the second line!",
rect=(50, 550, 200, 650),
font="Arial",
bold=True,
italic=True,
font_size="20pt",
font_color="00ff00",
border_color="0000ff",
background_color="cdcdcd",
) indicates the use of different colors ( |
Should be fixed by #2893. |
So, I'm trying to build a system to add/edit/delete Annotations on PDF.
But the Annotations do not use the given fontsize nor fontcolor.
And when I set border_color to 000000 I don't get any Text either, just the white "Annotation-Area" (white because of the background-color).
$ python -m platform macOS-12.6-x86_64-i386-64bit $ python -c "import pypdf;print(pypdf.__version__)" 3.14.0
No Traceback Error
As for the PDF(s).. it's for every PDF
The text was updated successfully, but these errors were encountered: