function pdf_write_value(&$value) { switch ($value[0]) { case PDF_TYPE_STRING: if ($this->encrypted) { $value[1] = $this->_RC4($this->_objectkey($this->current_obj_id), $value[1]); $value[1] = $this->_escape($value[1]); } break; case PDF_TYPE_STREAM: if ($this->encrypted) { $value[2][1] = $this->_RC4($this->_objectkey($this->current_obj_id), $value[2][1]); } break; case PDF_TYPE_HEX: if ($this->encrypted) { $value[1] = $this->hex2str($value[1]); $value[1] = $this->_RC4($this->_objectkey($this->current_obj_id), $value[1]); // remake hexstring of encrypted string $value[1] = $this->str2hex($value[1]); } break; } parent::pdf_write_value($value); }