method addPage documentation in bbn\File\Pdf
function($html, $cfg = NULL, $sign = false)
{
if ( $this->last_cfg !== $cfg ){
$this->last_cfg = $cfg;
$cfg = $this->getConfig($cfg);
if ( isset($cfg['template']) && is_file($cfg['template']) ){
$src = $this->pdf->SetSourceFile($cfg['template']);
$tpl = $this->pdf->importPage($src);
$this->pdf->SetPageTemplate($tpl);
}
else{
$this->pdf->DefHTMLHeaderByName('head', $this->cfg['head']);
$this->pdf->DefHTMLFooterByName('foot', $this->cfg['foot']);
}
}
$this->pdf->AddPageByArray([
'orientation' => $this->cfg['orientation'],
'margin-left' => $this->cfg['margin_left'],
'margin-right' => $this->cfg['margin_right'],
'margin-top' => $this->cfg['margin_top'],
'margin-bottom' => $this->cfg['margin_bottom'],
'margin-header' => $this->cfg['margin_header'],
'margin-footer' => $this->cfg['margin_footer'],
'odd-header-name' => 'head',
'odd-footer-name' => 'foot',
'odd-header-value' => 1,
'odd-footer-value' => 1
]);
if ( $sign ){
$this->pdf->WriteHTML($html.$this->cfg['signature']);
}
else{
$this->pdf->WriteHTML($html);
}
}
return $this;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions