如何在PHP中使用FDPF为文本加下划线?

Sco*_*ott 8 php underline fpdf

我试图让我的文字加下划线,FPDF但似乎不可能......我没有使用HTML.我使用的是DejaVuunicode字体,它支持UTF-8,也是我第一次使用FPDF.

这甚至可能吗?请给我一些解决方案.

Tho*_*ria 8

试试这个 :

$fpdf->SetFont('Dejavu','U'); //Where "U" means underline.
Run Code Online (Sandbox Code Playgroud)

另见(德文)http://www.fpdf.de/funktionsreferenz/?funktion=SetFont

另见(英文)http://www.fpdf.org/en/doc/setfont.htm

  • $ fpdf-> SetFont('','U');`就足够了。谢谢 ! (2认同)