2

Hello I have prepared a pdf by using TCPDF, but I have a problem regarding printing tick instead of 'GREEN X'. I am using html decimal value (✔), but it always shows question mark(?).

Image of structure is here https://i.stack.imgur.com/us4EN.jpg

My code of printing marks 'X' and 'O' is

$color = $pdf_colour[$row];
$this->SetTextColor($color[0],$color[1],$color[2]); // where color contains value of RGB
$text = $colour_text[$row]; // where $colour_text[$row] contains symbols ie, X,O
$this->Cell(self::w,0,$text, '', 0, 'L', $fill);

Please advice thanks.

Saket B
  • 41
  • 1
  • 6

1 Answers1

0

So I have figured it out by myself,

$color = $pdf_colour[$row];
$this->SetTextColor($color[0],$color[1],$color[2]); // where color contains value of RGB
$text = $colour_text[$row]; // where $colour_text[$row] contains symbols ie, X,O
$text = html_entity_decode($text);
$this->Cell(self::w,0,$text, '', 0, 'L', $fill);

And use functions like this

$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'ISO-8859-1', false);
$pdf->SetFont('DejaVuSerif', '',8);

Hope it helps some one :)

Saket B
  • 41
  • 1
  • 6