I have this code using TCPDF to create pdf invoices and it is working well. I now need to add the contents of another pdf to the last page(S).
I have found server example of this using FPDI but cannot work out how this would be incorporated within the code below.
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Harlyn Enterprises');
$pdf->SetTitle('');
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT);
//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// create first page
$pdf->AddPage();
$html = "html code for page 1 in here";
$pdf->writeHTML($html, true, false, true, false, '');
// create second page
$pdf->AddPage();
$html = "html code for page 2 in here";
$pdf->writeHTML($html, true, false, true, false, '');
$pdf[$site]->lastPage();
//Close and output PDF document
ob_clean();
$file = $_SERVER["filename.pdf";
$pdf->Output($file, 'F');
any help would be greatly appreciated.