Skip to content

Commit

Permalink
Polish vowels in PDF
Browse files Browse the repository at this point in the history
Using moodle in Polish language so, writing item contents in Polish, causes the pdf of a single response with special chars like: ąčęėįšųūž to be reported as ????????.
Changing the PDF font to freesans, seems to fix the problem.

Reference: https://stackoverflow.com/questions/5333702/tcpdf-utf-8-symbols-not-showing-up?rq=4
  • Loading branch information
kordan authored and stronk7 committed Feb 27, 2024
1 parent afa0e63 commit f054336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/submissions_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ private function replace_http_url($content) {
* @return void
*/
private function add_pdf_details($pdf, $user, $timecreated, $timemodified) {
$pdf->SetFont('helvetica', '', 12);
$pdf->SetFont('freesans', '', 12);

// Set document information.
$pdf->SetCreator(PDF_CREATOR);
Expand Down

0 comments on commit f054336

Please sign in to comment.