9951 explained code solutions for 126 technologies


php-tcpdfHow do I add a page to a PHP TCPDF document?


Adding a page to a PHP TCPDF document is a relatively simple process. The following example code shows how to add a new page to a TCPDF document.

$pdf->AddPage();

This code will add a new page to the current PDF document.

Code explanation

  • $pdf: This is an object of the TCPDF class which is used to create the PDF document.
  • AddPage(): This is a method of the TCPDF class which adds a new page to the current PDF document.

More information on the TCPDF class and its methods can be found in the TCPDF documentation.

Edit this code on GitHub