Can Not get wkhtmltopdf rendering Chinese characters #1449

Closed
opened 2026-02-05 00:55:40 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @weichen-ink on GitHub (Nov 14, 2019).

Describe the bug
Hey guys, I'm using bookstack with wkhtmltopdf plugin.
I did lots of reserch but still cannot get wkhtmltopdf to rendering chinese characters.

Steps To Reproduce
Steps to reproduce the behavior:

  1. tried to use Dompdf not working
  2. tried to install wkhtmltopdf and upload msyh.ttf & simsun.ttc fonts to /usr/share/fonts/ folder not working
  3. tried to install chinese fonts still not working
$ sudo apt-get install ttf-wqy-zenhei     
$ sudo apt-get install ttf-wqy-microhei
  1. tested use wkhtmltopdf command line " wkhtmltopdf www.baidu.com baidu.pdf", and download baidu.pdf file, it works well.

Expected behavior
Could any tell me how to set the font, Thanks a lot!!

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings):0.25.1(docker:linuxserver/bookstack)
  • PHP Version:7.2
  • Hosting Method (Docker): traefik 2.0
Originally created by @weichen-ink on GitHub (Nov 14, 2019). **Describe the bug** Hey guys, I'm using bookstack with wkhtmltopdf plugin. I did lots of reserch but still cannot get wkhtmltopdf to rendering chinese characters. **Steps To Reproduce** Steps to reproduce the behavior: 1. tried to use Dompdf not working 2. tried to install wkhtmltopdf and upload `msyh.ttf` & `simsun.ttc` fonts to `/usr/share/fonts/` folder not working ![](http://file.jzoy.com/2019/11/try-docker/wkhtmltopdf-github-issue-1.png) 3. tried to install chinese fonts still not working ``` $ sudo apt-get install ttf-wqy-zenhei $ sudo apt-get install ttf-wqy-microhei ``` 4. tested use wkhtmltopdf command line " wkhtmltopdf www.baidu.com baidu.pdf", and download baidu.pdf file, it works well. ![](http://file.jzoy.com/2019/11/try-docker/wkhtmltopdf-github-issue-2.png) **Expected behavior** Could any tell me how to set the font, Thanks a lot!! **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings):0.25.1(docker:linuxserver/bookstack) - PHP Version:7.2 - Hosting Method (Docker): traefik 2.0
Author
Owner

@or0or1 commented on GitHub (Nov 16, 2019):

兄弟,可以看看 https://github.com/or0or1/docker-bookstack/blob/master/readme-%E4%B8%AD%E6%96%87.md

@or0or1 commented on GitHub (Nov 16, 2019): 兄弟,可以看看 https://github.com/or0or1/docker-bookstack/blob/master/readme-%E4%B8%AD%E6%96%87.md 。
Author
Owner

@weichen-ink commented on GitHub (Nov 16, 2019):

太感谢了,可以解释一下问题产生的原因吗,折腾了一个星期了,愣是没解决。。。

@weichen-ink commented on GitHub (Nov 16, 2019): 太感谢了,可以解释一下问题产生的原因吗,折腾了一个星期了,愣是没解决。。。
Author
Owner

@ssddanbrown commented on GitHub (Jun 15, 2021):

Judging by the posting in https://github.com/linuxserver/docker-bookstack/issues/50, this appeared to be a problem specific to within the container environment. Will therefore close this off.

@ssddanbrown commented on GitHub (Jun 15, 2021): Judging by the posting in https://github.com/linuxserver/docker-bookstack/issues/50, this appeared to be a problem specific to within the container environment. Will therefore close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1449