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 committed Feb 3, 2024
1 parent aae52b7 commit a9ac3bc
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 @@ -1806,7 +1806,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 a9ac3bc

Please sign in to comment.