Skip to content

Mandarin characters become unrecognizable in PDF export while displaying correctly in web UI #2037

Closed

Description

@ching-kuo

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

  1. Use the docs application from https://github.com/suitenumerique/docs
  2. Create a BlockNote document with mixed English and Mandarin content:
    <p>This is a test document</p>
    <p>這是個測試文件</p>
  3. View the document in the web UI (Mandarin characters display correctly)
  4. Use the docs application's PDF download feature (which leverages BlockNote's functionality)
  5. Open the downloaded PDF untitled-document.pdf
  6. 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

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.

Activity

  1. nperez0111 commented on Sep 29, 2025

    @nperez0111
    Contributor

    I've not diagnosed this, but it is likely to do with react-pdf (https://github.com/diegomura/react-pdf) which is what we use to render to PDF, it could be the font that is embedded into the pdf, or unicode issues

  2. ching-kuo commented on Sep 29, 2025

    @ching-kuo
    Author

    Thanks for pointing out it might be an issue related to react-pdf
    I found a issue report there that is likely the same issue I encountered. It seems like there's a workaround.

  3. added
    needs-triage
    on Feb 5, 2026
  4. added
    bug:P3
    bug:P4
    and removed
    needs-triage
    bug:P3
    on Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:P4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions