Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

polarcubs's avatar

Tick sign in laravel DOMPDF

Hi,

I was trying to use the Laravel DOMPDF package and for some reasons, I am unable to get the tick sign displayed and wonder how do I actually get it out.

The symbol I'm referring to is ✔.

0 likes
9 replies
toniperic's avatar

@polarcubs what exactly do you get instead of the tick sign? Some more info and actual code would be appreciated and help us help you. :)

polarcubs's avatar

Hi @toniperic. I get empty (no symbol).

Actual code wise will be a generic view file in html. Which DOMPDF uses to generate the PDF.

a simple sample would be

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<p>✔</p>
<p>Other common characters such as euro sign work!</p>
</body>
</html>
bashy's avatar

Need to use UTF-8 (probably unicode not general)

polarcubs's avatar

Hi @bashy

I did specify UTF-8 as seen in the code example above. Or did I miss out something else?

toniperic's avatar

@polarcubs try changing

<meta charset="UTF-8">

to

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

It's from the official docs, worth a try.

bashy's avatar

It wouldn't be blank if you're displaying (and returning) it in UTF-8 unicode. Have you checked it's storing the character properly?

polarcubs's avatar

Hi @toniperic, I changed to that and it still doesn't work.

@bashy I think I did it correctly. I tried other signs like euro sign and it works. but for check mark nothing appears. I tried to use the HTML entity code as well (✔)

Wondering if I need to install custom fonts to solve this.

lewis4u's avatar

Some day that link won't work anymore....

Here is the solution and one more extra for 'wrong'

<div style="font-family: DejaVu Sans, sans-serif;">✔</div>
<div style="font-family: DejaVu Sans, sans-serif;">✗</div>
1 like

Please or to participate in this conversation.