[Solved] How to generate pdf with defined forms in php?


You are loading the contents of a static HTML file so you could put place holders within the html…

<h1>%title_placeholder%</h1>

and then use file get_contents

$html = file_get_contents("my_file.html");

and replace the placeholders with your form data

$html = str_replace("%title_placeholder%", $_POST['title'], $html);

then write your new string to mPDF

solved How to generate pdf with defined forms in php?