Warning: Invalid argument supplied for foreach() in administrator/components/com_vminvoice/helpers/vminvoice.php on line 379
public function AddPage(&$pdf, $orderID, $deliveryNote)
{
$html = new InvoiceHTML($orderID, $deliveryNote);
$code = $html->generateHTML();
$code = str_replace(' ', '', $code);
$pdf->setHTML($html);
$pdf->AddPage();
// check and fill image paths
$images = $this->getImages($code);
foreach ($images[1] as $image) {
if (substr($image, 0, strlen(JURI::root(true))) != JURI::root(true) || strlen(JURI::root(true)) == 0) {
$code = str_replace($image, JURI::root(true) . '/' . $image, $code);
}
}
$pdf->writeHTML($code, true, false, false, false, '');
}