Please find the below code:
<?php
use Spiritix\Html2Pdf\Converter;
use Spiritix\Html2Pdf\Input\StringInput;
use Spiritix\Html2Pdf\Output\DownloadOutput;
require_once 'vendor/autoload.php';
$html="<p>This is the Content</p>";
$input = new StringInput();
$input->setHtml($html);
$converter = new Converter($input, new DownloadOutput());
$converter->setOption('landscape', false);
$converter->setOption('displayHeaderFooter', true);
$converter->setOption('headerTemplate', '<p>Header Here</p>');
$converter->setOption('footerTemplate', '<p>Footer Here</p>');
$output = $converter->convert();
$output->download('SOL-'.date('Y-m-d-h-i-s').'.pdf');
?>
The above code is working fine except the Header and Footer part. Header and Footer is not showing in the PDF. Please provide some suggestion to solve this issue.
Followed the below link for reference: