Example #1
0
    public function testDump()
    {
        $factory = new ObjectFactory(1);

        $obj = new InternalType\StreamObject('some data', 55, 3, $factory);
        $this->assertEquals($obj->dump($factory), "55 3 obj \n<</Length 9 >>\nstream\nsome data\nendstream\nendobj\n");
    }
Example #2
0
 /**
  * Generate new \Zend\Pdf\InternalType\StreamObject
  *
  * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  *
  * @param mixed $objectValue
  * @return \Zend\Pdf\InternalType\StreamObject
  */
 public function newStreamObject($streamValue)
 {
     $obj = new InternalType\StreamObject($streamValue, $this->_objectCount++, 0, $this);
     $this->_modifiedObjects[$obj->getObjNum()] = $obj;
     return $obj;
 }