Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Special Character #1795

Discussion options

Hi everyone, I facing an issue when updating a widget value by a string containing a special character, It still updates on the field_value, but does not render on the pdf when I open it by browser or any view pdf file tool

here is my code

doc = fitz.open("example.pdf")
page = doc.load_page(0)
widgets = list(page.widgets())
widgets[0].field_value = "text contain special chracter †"
widgets[0].update()
doc.save("new.pdf")

Any suggestions for this case? thanks

You must be logged in to vote

PDF form fields in (Py-) MuPDF only support characters available in the Base-14 fonts, i.e. Times-Roman, Helvetica and Courier.
For checkboxes, specifying ZapfDingbats is also supported.

Replies: 1 comment 4 replies

Comment options

PDF form fields in (Py-) MuPDF only support characters available in the Base-14 fonts, i.e. Times-Roman, Helvetica and Courier.
For checkboxes, specifying ZapfDingbats is also supported.

You must be logged in to vote
4 replies
Comment options

I am trying to insert few words which has characters like ě, ř, etc. that are not getting rendered in widget form field. How can I make it visible/rendered? Is it possible?

Comment options

There is no way to have that. This is a consequence of currently being restricted to Base-14 fonts.

Comment options

Is there any plan to support it? This restricts content from languages such as czech which has such characters and not able to display/render correctly.
However, when form field is clicked, it is visible/rendered and once pdf is saved then it remains visible/rendered. So, after interaction it might be recreating appearance.

Comment options

Supporting user-supplied fonts is in our plans, but there is no fixed date yet.

Answer selected by JorjMcKie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /