BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Incorrect encoding when exporting to pdf

Open ishaulov opened this issue 1 month ago • 4 comments

Attempted Debugging

  • [x] I have read the debugging page

Searched GitHub Issues

  • [x] I have searched GitHub for the issue.

Describe the Scenario

Hi! When exporting a document in PDF format, the encoding of the headings breaks: in Cyrillic, I see "?????" instead. I searched for a solution on Github, but couldn't find one. Please, help me: what's wrong and what can be fixed?

Image

Exact BookStack Version

BookStack v25.07

Log Content


Hosting Environment

Ubuntu 22.04, PHP 8.3.19, ~# locale LANG=ru_RU.UTF-8 LANGUAGE= LC_CTYPE="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_COLLATE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_MESSAGES="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NAME="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_TELEPHONE="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_ALL=

ishaulov avatar Nov 07 '25 10:11 ishaulov

I met this truoble too, but I don't know how to solve it.

shmbatom avatar Nov 11 '25 04:11 shmbatom

BookStack uses dompdf as the PDF export engine. You can find a solution at https://github.com/dompdf/dompdf?tab=readme-ov-file#about-fonts--character-encoding.

zhang-nianqiang avatar Nov 11 '25 04:11 zhang-nianqiang

To zhang-nianqiang You should give detail link, and we all know that bookStack uses dompdf as the PDF export engine. What you given is unuseful.

shmbatom avatar Nov 11 '25 07:11 shmbatom

Switching to WKHTMLTOPDF helped me

Ozilly avatar Nov 30 '25 17:11 Ozilly