I am currently using Dompdf for exporting an HTML page to PDF. The issue I am facing is that when the HTML file contains Font Awesome icons, in the resulting PDF there are question marks instead of the icons.
Below is a snippet of the HTML code:
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Some title</title>
<!-- Latest compiled and minified CSS - Bootstrap-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link href="http://domain.com/public/assets/css/font-awesome-4.6.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<!-- -->
<div id="wrapper" > <div id="page-wrapper"> <div class="container-fluid">
<div class="row">
<div class="col-xs-10 col-xs-offset-1">
<div class="panel panel-default panel-table">
<div class="panel-heading">
<div class="row">
<div class="col-xs-12">
<div class="bs-callout bs-callout-primary">
<h4>Contact name</h4>
<ul>
<li><span class="fa fa-envelope"></span> <strong>Email</strong>: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="41322e2c24012c20282d6f222e2c">[email protected]</a></li>
<li><span class="fa fa-phone"></span> <strong>Telephone</strong>: 0000-0000</li>
<li><span class="fa fa-location-arrow"></span> <strong>Location</strong>: Address</li>
</ul>
</div>
</div>
</div>
</div>
<div class="panel-body">
<!-- A table goes here -->
</div> </div>
</div>
</div>
</div>
</div>
</div><!-- .wrapper -->
</body>
</html>
The icons do not appear in the PDF generated, showing only question marks instead:
<li><span class="fa fa-envelope"></span> <strong>Email</strong>: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="582b37353d1835393134763b3735">[email protected]</a></li>
<li><span class="fa fa-phone"></span> <strong>Telephone</strong>: 0000-0000</li>
<li><span class="fa fa-location-arrow"></span> <strong>Location</strong>: Address</li>
How can this be resolved?