Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display checkmark &#x2713 in tcpdf

Tags:

php

pdf

fonts

tcpdf

I'm using TCPDFs writeHTML to convert some html-code into a pdf. This works fine so far except that the checkmark (&#x2713) is converted into a questionmark instead of... well, a checkmark ;-) The PDF is created as UTF-8, but neither feeding the checkmark itself nor the hex-representation resulted in showing the correct checkmark. I tried to used the fonts Helvetica and Times, shipped with TCPDF, but both only display ?. Any idea how to get the checkmark into the PDF?

like image 501
Werner Avatar asked Sep 30 '25 09:09

Werner


1 Answers

@Nuno answer was a huge help. For those wondering, the writeHTML equivalent (as asked by OP) is :

<span style="font-family:zapfdingbats;">3</span>
like image 68
Nomis Avatar answered Oct 02 '25 04:10

Nomis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!