From efcc32bb0fb8fb8a3697ec9e232e028b4052b09f Mon Sep 17 00:00:00 2001 From: Juan Antonio Martinez Date: Thu, 1 Oct 2015 14:48:33 +0200 Subject: [PATCH] pdf: translate text html entities to utf8 --- agility/server/pdf/print_common.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agility/server/pdf/print_common.php b/agility/server/pdf/print_common.php index 62717fcbe..a32989ae6 100644 --- a/agility/server/pdf/print_common.php +++ b/agility/server/pdf/print_common.php @@ -56,8 +56,9 @@ class PrintCommon extends FPDF { protected $centro; function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') { - // convert to iso-latin1 - $txt=utf8_decode($txt); + if (!is_string($txt)) { parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link); return; } + // convert to iso-latin1 from html + $txt=utf8_decode(html_entity_decode($txt)); // translate federation related strings $txt=$this->federation->strToFederation($txt,$this->prueba->RSCE); // let string fit into box