I am generating pdf invoice using fpdf.
Some invoices containing many items, and details need to go into the second page. However, I need the total, and other details to be displayed on the first page.
Right now, if I can add new page like this: $pdf->AddPage();
But, this puts everything into the second page, whatever after this statement.
There seems to be no way to specify the page for either write or cell methods.
Rendering, and calculations are bit complex, thus don't want to store into a temp array and display after fully rendering the first page.
Thank you.
if(!empty($this->replace) && !empty($this->replacement)){
$this->pages[$n]=str_replace($this->replace,$this->replacement,$this->pages[$n]);
}
I added this code to the fpdf class in _putpages() right under /Page content line 2851
Example after adding above to code:
$pdf->replace = array("{paid_msg}","{balance}");
$pdf->replacement = array("Paid","0.00");
It can be a string or an array.