-
Notifications
You must be signed in to change notification settings - Fork 661
Special Character #1795
-
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
Beta Was this translation helpful? Give feedback.
All reactions
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
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
-
There is no way to have that. This is a consequence of currently being restricted to Base-14 fonts.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
Supporting user-supplied fonts is in our plans, but there is no fixed date yet.
Beta Was this translation helpful? Give feedback.