diff --git a/src/Boleto/Render/AbstractPdf.php b/src/Boleto/Render/AbstractPdf.php index 44064255..1f4d7882 100644 --- a/src/Boleto/Render/AbstractPdf.php +++ b/src/Boleto/Render/AbstractPdf.php @@ -81,7 +81,10 @@ public function _beginpage($orientation, $size, $rotation) parent::_beginpage($orientation, $size, $rotation); if ($this->NewPageGroup) { // start a new group - $n = sizeof($this->PageGroups) + 1; + if (!is_array($this->PageGroups)) { + $this->PageGroups = []; + } + $n = sizeof($this->PageGroups) + 1; $alias = '{' . $n . '}'; $this->PageGroups[$alias] = 1; $this->CurrPageGroup = $alias;