I tried found solution in https://mpdf.github.io/reference/mpdf-functions/writetext.html but I am not able to found proper solution.
Actually source pdf to add/write one line in first pdf page but it always return 1 pdf page in output, Rest of pages are gone. Really strange issue. Actually my PDF have multiple page.
Here is my code.
require_once APPPATH . './libraries/mpdf/vendor/autoload.php';
if (ob_get_contents()) ob_end_clean();
$Text = "This score is for Mr. John Deo";
$mpdf = new \Mpdf\Mpdf();
$mpdf->SetImportUse(); // only with mPDF <8.0
$file = Sample.pdf'; //This PDF have 2 pages
$pagecount = $mpdf->SetSourceFile($file);
$tplId = $mpdf->ImportPage($pagecount);
$mpdf->UseTemplate($tplId);
$mpdf->SetFont('Arial','B', 11);
$mpdf->WriteText(10,10, $Text );
$mpdf->Output('new.pdf', 'F'); //Return 1 page in output with writetext.
Can you please let me know what is wrong with this code? This code is only return first page not all pages in output.