protected function _beginDoc() { // Start document, but only if not yet started. if ($this->_state < 1) { $this->_state = 1; $this->_out('%PDF-1.3'); } }