mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.23k stars 9.83k forks source link

FreeText does not support Chinese content #18173

Closed heyong3235 closed 1 month ago

heyong3235 commented 1 month ago

When Chinese annotations entered using FreeText in PDF.js are exported to a PDF file, the PDF, when opened in Edge or Chrome browsers, does not display the Chinese annotations. However, they are displayed normally when opened in a PDF reader client. The content of FreeText in English or numbers is not affected; it seems that only the Chinese content is not supported. Research has found that the issue may be caused by a failure in encoding the FreeText content with the font used in the createNewAppearanceStream method. How can I add support for Chinese language fonts, or how can I improve this?

Snuffleupagus commented 1 month ago

This is likely a duplicate of e.g. issue #15769, however given that you completely ignored the entire ISSUE_TEMPLATE it's difficult to know.