yllen / pdf

GNU Affero General Public License v3.0
14 stars 14 forks source link

Problem with special characters in generated PDFs #37

Closed Hantiel closed 1 year ago

Hantiel commented 1 year ago

Hi I have a problem with special characters in generated PDF. GLPI 10.0.5 Plugin 3.0.0 Language - Polish

Is it possible to edit / add a font that supports special characters ? image

yllen commented 1 year ago

I think your issue is like https://github.com/yllen/pdf/issues/8

Hantiel commented 1 year ago

Manually changing the variable "$font=helvetica" in file pdf/inc/siimplepdf.class.php to a font that supports my language solved the problem - for me "dejavusans" And this font I have set i GLPI.

$pdf->SetCreator('GLPI'); $pdf->SetAuthor('GLPI'); $font = 'helvetica'; //$subsetting = true; $fonsize = 8; if (isset($_SESSION['glpipdffont']) && $_SESSION['glpipdffont']) { $font = $_SESSION['glpipdffont']; //$subsetting = false; } $pdf->setHeaderFont(Array($font, 'B', 8)); $pdf->setFooterFont(Array($font, 'B', 8));

yllen commented 1 year ago

As previously said, you must change the PDF export font in GLPI. This change is for GLPI and for the plugin. Setup / General / Default values / PDF export font

Hantiel commented 1 year ago

I think your issue is like #8