View Issue Details

This issue affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
20480Bug reportsImport/Exportpublic2026-04-08 10:58
ReporterFreda Assigned Tomohabmes  
PrioritynoneSeverityminor 
Status assignedResolutionopen 
Summary20480: Arabic characters appear as ????? when exporting responses to PDF.
Description

When exporting survey responses to PDF, answers containing Arabic characters are displayed as ????? instead of the correct text.
The issue occurs when the survey language is primarily English but respondents enter non-Latin text such as Arabic in free text fields.

I have attached screenshots and .lsa file

Steps To Reproduce

Steps to reproduce

Steps to Reproduce
Import the attached .lsa survey.
Add a response containing Arabic text in a text question.
Export the response as PDF.
Observe the exported PDF.

Expected result

Arabic characters should appear correctly in the exported PDF.

Actual result

Arabic characters appear as: ????????

Findings

Investigation shows the issue is related to the default font used by TCPDF.

By default, TCPDF uses the Helvetica font, which does not support Arabic characters.

Relevant source:
https://github.com/LimeSurvey/LimeSurvey/blob/13801a24bbd47003fd3d837f0871c0001d4a2442/vendor/tecnickcom/tcpdf/tcpdf_autoconfig.php#L197

Since Helvetica lacks Arabic glyphs, the characters are replaced with ????? during PDF generation.

Suggested Solutions

Option 1 (Recommended)
Use DejaVu Sans as the default PDF font since it supports Unicode and Arabic.

Option 2
Configure an alternate font for English by adding:

'en' => 'dejavusans',

to:

application/config/config-defaults.php

Reference:
https://github.com/LimeSurvey/LimeSurvey/blob/13801a24bbd47003fd3d837f0871c0001d4a2442/application/config/config-defaults.php#L368

TagsNo tags attached.
Attached Files
Bug heat0
Complete LimeSurvey version number (& build).
I will donate to the project if issue is resolvedNo
Browser
Database type & version.
Server OS (if known)
Webserver software & version (if known)
PHP Version.

Users monitoring this issue

There are no users monitoring this issue.

Activities

Issue History

Date Modified Username Field Change
2026-04-08 10:58 Freda New Issue
2026-04-08 10:58 Freda File Added: survey_archive_991737.lsa
2026-04-08 10:58 Freda File Added: Screenshot 2026-04-08 at 11.57.07.png
2026-04-08 10:58 Freda File Added: Screenshot 2026-04-08 at 11.57.36.png
2026-04-08 10:58 Freda Assigned To => mohabmes
2026-04-08 10:58 Freda Status new => assigned