See the details here
/*domPDF, J! Bootstrap5 template*/
#$form .row {position:relative;display:block; page-break-inside: avoid; padding:.6rem}
#$form .col-sm-2 {display:inline-block;width:16%;vertical-align:top;}
#$form .col-sm-3 {display:inline-block;width:24%;vertical-align:top;}
#$form .col-sm-4 {display:inline-block;width:32%;vertical-align:top;}
#$form .col-sm-5 {display:inline-block;width:40%;vertical-align:top;}
#$form .col-sm-6 {display:inline-block;width:48%;vertical-align:top;}
#$form .col-sm-7 {display:inline-block;width:56%;vertical-align:top;}
#$form .col-sm-8 {display:inline-block;width:64%;vertical-align:top;}
#$form .col-sm-9 {display:inline-block;width:72%;vertical-align:top;}
#$form .col-sm-10 {display:inline-block;width:80%;vertical-align:top;}
#$form .col-sm-11 {display:inline-block;width:88%;vertical-align:top;}
#$form .col-sm-12 {display:inline-block;width:96%;vertical-align:top;}
/*May be for image display*/
#{$form} img {width:auto;height:auto;}
#{$form} .icon-checkmark:before {content:'yes'}
#{$form} .icon-remove:before {content:'no'}
#listform_$c .fabrikList .row-fluid .span4 {display:inline-block;width:26%;float:none;}
#listform_$c .fabrikList .row-fluid {page-break-inside:avoid;}
?>
<div id="footdompdf">
<span class="footleft"><?php echo $this->table->label;?></span>
<span class="pagenum">Page </span>
</div>
<div id="headerdompdf">
<span class="headleft"><?php echo $this->table->label;?></span>
<span class="pdfdate">19-11-2013</span>
</div>
<?php
body {margin-top:1.5em;margin-bottom:1.5em}
#headerdompdf {
display:block;
position: fixed;
top: 0px;
width:100%;
height:1.1em;
border-bottom: 1px solid red;
}
#footdompdf {
display:block;
position: fixed;
bottom: 0px;
width:100%;
height: 1.1em;
border-top: 1px solid red;
}
#footdompdf .pagenum { position:absolute;
right: 20px;}
#footdompdf .pagenum:after {
content: counter(page) ; //This is including the page number at bottom right
}
#footdompdf .footleft {
color:red;
}
?>
<style>
@page {size:auto;
margin-top:3cm;margin-bottom:3cm;
odd-header-name: html_MyHeader1;
odd-footer-name: html_MyFooter1;
}
.fabrikDataContainer table {page-break-inside:auto;width:100%;}
</style>
<htmlpageheader name="MyHeader1">
<div style="text-align: right; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;">My document {DATE j-m-Y}</div>
</htmlpageheader>
<htmlpagefooter name="MyFooter1">
<table width="100%">
<tr>
<td width="33%">{DATE j-m-Y}</td>
<td width="33%" align="center">{PAGENO}/{nbpg}</td>
<td width="33%" style="text-align: right; ">My document</td>
</tr>
</table>
</htmlpagefooter>
<?php
* {font-family:'dejavu sans'!important}
@font-face {
font-family: 'yourfontname';
font-style: normal;
font-weight: normal;
src: url('https://websitedomain/subfoldername/yourfontname.ttf) format('truetype');
}
echo $this->filters['test___date_time']->displayValue;
$Options->set("isPhpEnabled", true);
$Options["Attachment"] = false;
$attachment = $Options["Attachment"] ? "attachment" : "inline";
$attachment = "inline";