I have a problem with generation pdf using CodeIgniter and dompdf, My code is:
public function generateTitlePage($name = '', $surname='', $number='', $village='')
{
$this->load->library('dompdf_gen');
$dompdf = new DOMPDF();
$html = <<<HTML
<html>
<body>
<h1>Hello:$name</h1><br />
<h1>Hello:$surname</h1><br />
<h1>Hello:$number</h1><br />
<h1>Hello:$village</h1>
</body>
</html>
HTML;
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("welcome.pdf");
}
The resultat for this function is
Hello: Name Surname number village
Hello:
Hello:
Hello:
But I need to separate this:
Hello:Name
Hello:Surname
Hello:number
Hello:village
Help me please. The function is called:
<a href="<?=base_url()."dosar/generateTitlePage($d[name]$d[surname]$d[number]$d[village])" ?>" class="btn btn-primary btn-sm marg-top-10">Generate</a>