protected function render()
{
if (!$this->dompdf) {
throw new Exception('DOMPDF not created yet');
}
$this->dompdf->setPaper($this->paper, $this->orientation);
$this->dompdf->render();
if ($this->showWarnings) {
global $_dompdf_warnings;
if (count($_dompdf_warnings)) {
$warnings = '';
foreach ($_dompdf_warnings as $msg) {
$warnings .= $msg . "\n";
}
// $warnings .= $this->dompdf->get_canvas()->get_cpdf()->messages;
if (!empty($warnings)) {
throw new Exception($warnings);
}
}
}
$this->rendered = true;
}