FPDM cant print € when Merge(true)

38 Views Asked by At

I'm trying to print symbol on PDF forms with Merge(true) but it is shown '⇬' instead but its printed correctly when Merge(false).

Link to library here and I'm using PHP 8.2.5.

I tried to fix it by using utf8_decode but it shows '?' and by changing second parameter in FPDM Load method but there is no difference.

I'm using Arial font.

Example code:

$pdf = new FPDM('template.pdf');
$fields["name"] = 20.5 . "€"; //outputs 20.5€
$pdf->Load($fields, true);
$pdf->Merge(false);
$pdf->Output("D", "name.pdf");
return $pdf;

Example code2:

$pdf = new FPDM('template.pdf');
$fields["name"] = 20.5 . "€"; //outputs 20.5⇬
$pdf->Load($fields, true);
$pdf->Merge(true);
$pdf->Output("D", "name.pdf");
return $pdf;

Tried to use chr(128) instead, but doesn't show anyway.

0

There are 0 best solutions below