function _enddoc() { if (!empty($this->extgstates) && $this->PDFVersion < '1.4') { $this->PDFVersion = '1.4'; } parent::_enddoc(); }