example42_MPDFI_templatedoc.php 851 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. include("../mpdf.php");
  3. $mpdf=new mPDF('','','','',15,15,47,16,9,9);
  4. $mpdf->SetImportUse();
  5. $mpdf->SetDocTemplate('sample_logoheader2.pdf',1); // 1|0 to continue after end of document or not - used on matching page numbers
  6. //===================================================
  7. $mpdf->AddPage();
  8. $mpdf->WriteHTML('Hallo World');
  9. $mpdf->AddPage();
  10. $mpdf->WriteHTML('Hallo World');
  11. $mpdf->AddPage();
  12. $mpdf->WriteHTML('Hallo World');
  13. //===================================================
  14. $mpdf->RestartDocTemplate();
  15. //===================================================
  16. $mpdf->AddPage();
  17. $mpdf->WriteHTML('Hallo World');
  18. $mpdf->AddPage();
  19. $mpdf->WriteHTML('Hallo World');
  20. $mpdf->AddPage();
  21. $mpdf->WriteHTML('Hallo World');
  22. //===================================================
  23. $mpdf->Output();
  24. exit;
  25. ?>