-
-
Notifications
You must be signed in to change notification settings - Fork 644
Description
Describe the bug
When downloading a PDF containing Mandarin (Chinese) characters using the docs application (https://github.com/suitenumerique/docs) which utilizes BlockNote for editing and download functionality, all Mandarin characters become unrecognizable/corrupted in the generated PDF, while they display correctly in the web UI.
To Reproduce
- Use the docs application from https://github.com/suitenumerique/docs
- Create a BlockNote document with mixed English and Mandarin content:
<p>This is a test document</p> <p>這是個測試文件</p>
- View the document in the web UI (Mandarin characters display correctly)
- Use the docs application's PDF download feature (which leverages BlockNote's functionality)
- Open the downloaded PDF untitled-document.pdf
- Observe that Mandarin characters are unrecognizable/corrupted while English text remains intact
Expected behavior
Mandarin characters should render correctly in the downloaded PDF, matching their appearance in the web UI.
Misc
- Node version: 22.18.1
- Package manager: yarn@1.22.22
- BlockNote version: 0.37.0
- Implementation: Using docs from https://github.com/suitenumerique/docs (which integrates BlockNote)
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Additional Information
This appears to be a font encoding or font embedding issue specific to PDF generation within the docs application's implementation of BlockNote. The issue may be related to how the docs application handles PDF export or how BlockNote's PDF generation handles non-Latin character sets.