ZF-3701: impossible to extend PDF classes
Due to the many private variables in the Zend_Pdf classes, it is not possible to extend these classes.
For example, if i wanted to use an extended version of the Zend_Pdf_Page class, i would have to extend Zend_Pdf too, since the $page object is created from within this class. However, for this operation the private $this->_objFactory variable is needed. Dead end. Suppose we solve this problem and we succesfully overload the newPage() method with our own extended version of Zend_Pdf() (so it creates a page object of the extended Zend_Pdf_Page class) and now we want to overload the drawText() method to make it more flexibel. Again, we bump into all sorts of private variables like $this->_font and, worse, $this->_contents! Since $this->_contents doesn't have a getter or a setter it is impossible to ever extend the Zend_Pdf_Page class, because you won't be able to add content. So, more dead ends. There are even private methods like _addProcSet() that you won't be able to use.