[reportlab-users] Subclassing BaseDocTemplate

Juha Tuomala Juha.Tuomala at iki.fi
Thu Jan 25 07:43:28 EST 2007





On Thursday 25 January 2007 14:30, Riaan Bekker wrote:

> Everybody always uses self.canv after they subclassed BaseDocTemplate .

> Where does this variable come from ?


From here?
----------------------------------------------------------------------
class BaseDocTemplate:
.
.
.
.
def _startBuild(self, filename=None, canvasmaker=canvas.Canvas):
self._calc()
self.canv = canvasmaker(filename or self.filename,
pagesize=self.pagesize,
invariant=self.invariant,
pageCompression=self.pageCompression)


----------------------------------------------------------------------

_startBuild is called by build().

Sometimes it seems to be passed to flowable where it's used internally.

BR,

Tuju

--
Ajatteleva ihminen tarvitsee unta.


More information about the reportlab-users mailing list