Incorrect encoding when exporting to pdf #5484

Open
opened 2026-02-05 10:06:04 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @ishaulov on GitHub (Nov 7, 2025).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • 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=

Originally created by @ishaulov on GitHub (Nov 7, 2025). ### 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? <img width="835" height="365" alt="Image" src="https://github.com/user-attachments/assets/1da4bd05-6b9e-4fa2-ad4a-cfe9df66d142" /> ### Exact BookStack Version BookStack v25.07 ### Log Content ```text ``` ### 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=
OVERLORD added the 🐕 Support label 2026-02-05 10:06:04 +03:00
Author
Owner

@shmbatom commented on GitHub (Nov 11, 2025):

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

@shmbatom commented on GitHub (Nov 11, 2025): I met this truoble too, but I don't know how to solve it.
Author
Owner

@zhang-nianqiang commented on GitHub (Nov 11, 2025):

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 commented on GitHub (Nov 11, 2025): 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.
Author
Owner

@shmbatom commented on GitHub (Nov 11, 2025):

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 commented on GitHub (Nov 11, 2025): 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.
Author
Owner

@Ozilly commented on GitHub (Nov 30, 2025):

Switching to WKHTMLTOPDF helped me

@Ozilly commented on GitHub (Nov 30, 2025): Switching to WKHTMLTOPDF helped me
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5484