Example #1
0
 /**
  * Dump object to a string to save within PDF file
  *
  * $factory parameter defines operation context.
  *
  * @param Zend_Pdf_ElementFactory $factory
  * @return string
  */
 public function dump(Zend_Pdf_ElementFactory $factory)
 {
     $shift = $factory->getEnumerationShift($this->_factory);
     // Update stream length
     $this->dictionary->Length->value = $this->length();
     return $this->_objNum + $shift . " " . $this->_genNum . " obj \n" . $this->dictionary->toString($factory) . "\n" . $this->_value->toString($factory) . "\n" . "endobj\n";
 }
Example #2
0
 /**
  * Dump object to a string to save within PDF file.
  *
  * $factory parameter defines operation context.
  *
  * @param Zend_Pdf_ElementFactory $factory
  * @return string
  */
 public function dump(Zend_Pdf_ElementFactory $factory)
 {
     $shift = $factory->getEnumerationShift($this->_factory);
     return $this->_objNum + $shift . " " . $this->_genNum . " obj \n" . $this->_value->toString($factory) . "\n" . "endobj\n";
 }
Example #3
0
 /**
  * Dump object to a string to save within PDF file
  *
  * $factory parameter defines operation context.
  *
  * @param Zend_Pdf_ElementFactory $factory
  * @return string
  */
 public function dump(Zend_Pdf_ElementFactory $factory)
 {
     $shift = $factory->getEnumerationShift($this->_factory);
     if ($this->_streamDecoded) {
         $this->_initialDictionaryData = $this->_extractDictionaryData();
         $this->_encodeStream();
     } else {
         if ($this->_initialDictionaryData != null) {
             $newDictionary = $this->_extractDictionaryData();
             if ($this->_initialDictionaryData !== $newDictionary) {
                 $this->_decodeStream();
                 $this->_initialDictionaryData = $newDictionary;
                 $this->_encodeStream();
             }
         }
     }
     // Update stream length
     $this->dictionary->Length->value = $this->_value->length();
     return $this->_objNum + $shift . " " . $this->_genNum . " obj \n" . $this->dictionary->toString($factory) . "\n" . $this->_value->toString($factory) . "\n" . "endobj\n";
 }