/** * Object constructor * * @param mixed $val * @param integer $objNum * @param integer $genNum * @param Zend_Pdf_ElementFactory $factory * @param Zend_Pdf_Element_Dictionary|null $dictionary * @throws Zend_Pdf_Exception */ public function __construct($val, $objNum, $genNum, Zend_Pdf_ElementFactory $factory, $dictionary = null) { parent::__construct(new Zend_Pdf_Element_Stream($val), $objNum, $genNum, $factory); if ($dictionary === null) { $this->_dictionary = new Zend_Pdf_Element_Dictionary(); $this->_dictionary->Length = new Zend_Pdf_Element_Numeric(strlen($val)); $this->_streamDecoded = true; } else { $this->_dictionary = $dictionary; $this->_streamDecoded = false; } }
/** * Object constructor * * @param mixed $val * @param integer $objNum * @param integer $genNum * @param Zend_Pdf_ElementFactory $factory * @throws Zend_Pdf_Exception */ public function __construct($val, $objNum, $genNum, Zend_Pdf_ElementFactory $factory) { parent::__construct(new Zend_Pdf_Element_Stream($val), $objNum, $genNum, $factory); $this->dictionary = new Zend_Pdf_Element_Dictionary(); $this->dictionary->Length = new Zend_Pdf_Element_Numeric($this->length()); }