fillable-pdf icon indicating copy to clipboard operation
fillable-pdf copied to clipboard

Missing national characters

Open tfader opened this issue 2 years ago • 2 comments

Any idea what I'm doing wrong or what should I change?

In any fields with value included national characters, proper value is displayed only when field is "clicked/active"

In printout or preview national characters are invisible.

Working OKey only when I input manually (from Adobe Reader or macOs preview) values with national characters.

The issue is only when I fill form from RoR application (UTF-8 as default for app and DB).

Examples as attached.

Zrzut ekranu 2022-07-7 o 14 48 02 Zrzut ekranu 2022-07-7 o 14 51 00

tfader avatar Jul 07 '22 12:07 tfader

Second param in method set_field in FillablePDF class helps (as attached).

Possibility to set params value in method set_field will be helpful. Zrzut ekranu 2022-07-7 o 18 08 45

tfader avatar Jul 07 '22 16:07 tfader

Unfortunately the fix to add false as a second parameter of setValue does not work with the latest iText version (7.2.3). The problem is likely with the encoding of the original PDF file, and the encoding of the font you're using in that form field probably does not support these types of characters.

vkononov avatar Jul 14 '22 20:07 vkononov

There is now a generate_appearance optional parameter for the set_field and set_fields methods that partially addresses this problem.

vkononov avatar Dec 19 '22 15:12 vkononov

Thank you for this change. Now it's OK.

tfader avatar Dec 20 '22 10:12 tfader