Skip to content

Commit

Permalink
pdf: translate text html entities to utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsito committed Oct 1, 2015
1 parent 8a45fae commit efcc32b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agility/server/pdf/print_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit efcc32b

Please sign in to comment.