I want to add Baamini font in Dompdf and also i want to add header and footer in dompdf My Controller :
$FileName = 'Test.pdf';
if(isset($request->hidden_html)){$data['hidden_html']=$request->hidden_html;}
$html = '<link rel="stylesheet" href="bootstrap.min.css">';
$html.="<style>table th,table td{border-collapse: collapse;border: 1px solid rgba(0, 0, 0, .5);text-align: center;padding: 10px;font-size:12px!important;}table {width: 100%;margin-bottom: 1rem;color: #212529;border-collapse: collapse;} @page {margin: 0cm 0cm;}body {margin-top: 3cm; margin-left: 2cm;margin-right: 2cm;margin-bottom: 2cm;}header {position: fixed;top: 0cm;left: 0cm;right: 0cm;height: 3cm;}footer {position: fixed; bottom: 0cm; left: 0cm; right: 0cm;height: 2cm;@font-face{font-family: Baamini; src: url(http://projectname(example)/css/Baamini.ttf) format('truetype');}.tamilfont{font-family: Baamini!important;}</style>";
$html .= $data['hidden_html'];
$pdf = new Dompdf();
$pdf->set_option('defaultFont', 'Courier');
$pdf->load_html($html);
$pdf->render();
$pdf->stream($FileName, array("Attachment" => true));
Result: