Fpdf and special characters

2019-08-09 00:43发布

I am trying to write out some special characters with built in fonts, is there any way to do this?

$str = 'ščťžýáíéäúň§ôúőűáéóüöűú'; $str = iconv('UTF-8', 'windows-1252', $str);

the result is one letter Š, not too good. :)

1条回答
Evening l夕情丶
2楼-- · 2019-08-09 01:14

You'll need to use tFPDF derivate of FPDF. tFPDF uses the PHP multi-byte string functions and generates its output encoded with UTF-8. FPDF does not. You'll also need to use a font that supports all the Unicode characters you want to use. Most commonly, I'll use Arial.

See: http://fpdf.org/en/script/script92.php

查看更多
登录 后发表回答