admin管理员组

文章数量:1400188

Using pymupdf, how can I make the text on an annotation through add_freetext_annot be bold?

I can't seem to find a way to do it.

Thank you

Using pymupdf, how can I make the text on an annotation through add_freetext_annot be bold?

I can't seem to find a way to do it.

Thank you

Share Improve this question asked Mar 24 at 16:58 user1910714user1910714 1099 bronze badges 1
  • 1 Just answered this question over in our Discord channel. PyMuPDF now fully supports this including callout arrows and global language support i.e. text shaping via Harfbuzz. Note: I am a maintainer and the original creator of PyMuPDF. – Jorj McKie Commented Mar 24 at 17:10
Add a comment  | 

1 Answer 1

Reset to default 0

Thank you to Harald Lieder who replied elsewhere with:

You can use the new rich text support of free-text annotations. This is a genuine PDF feature which we now support. You must specify richtext=True and supply a string that contains HTML-syntax like <b>this is bold</b>.

Here is the documentation https://pymupdf.readthedocs.io/en/latest/page.html#Page.add_freetext_annot

本文标签: Using pymupdfhow can I make an annotation through addfreetextannot be boldStack Overflow