reportlab/pdfgen/canvas.py
changeset 2197 6549f2ebb21a
parent 2045 cc042609c62e
child 2199 a103025414f5
equal deleted inserted replaced
2196:c04e09c8635e 2197:6549f2ebb21a
     1 #copyright ReportLab Inc. 2000
     1 #copyright ReportLab Inc. 2000
     2 #see license.txt for license details
     2 #see license.txt for license details
     3 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/canvas.py?cvsroot=reportlab
     3 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/pdfgen/canvas.py?cvsroot=reportlab
     4 #$Header: /tmp/reportlab/reportlab/pdfgen/canvas.py,v 1.117 2003/09/08 16:08:15 rgbecker Exp $
     4 #$Header: /tmp/reportlab/reportlab/pdfgen/canvas.py,v 1.118 2004/01/13 11:22:17 rgbecker Exp $
     5 __version__=''' $Id: canvas.py,v 1.117 2003/09/08 16:08:15 rgbecker Exp $ '''
     5 __version__=''' $Id: canvas.py,v 1.118 2004/01/13 11:22:17 rgbecker Exp $ '''
     6 __doc__="""
     6 __doc__="""
     7 The Canvas object is the primary interface for creating PDF files. See
     7 The Canvas object is the primary interface for creating PDF files. See
     8 doc/userguide.pdf for copious examples.
     8 doc/userguide.pdf for copious examples.
     9 """
     9 """
    10 
    10 
   376         page.setStream([self._preamble] + self._code)
   376         page.setStream([self._preamble] + self._code)
   377         self._setXObjects(page)
   377         self._setXObjects(page)
   378         self._setAnnotations(page)
   378         self._setAnnotations(page)
   379         self._doc.addPage(page)
   379         self._doc.addPage(page)
   380 
   380 
   381         if self._onPage:
   381         if self._onPage: self._onPage(self._pageNumber)
   382             self._onPage(self._pageNumber)
   382         self._startPage()
       
   383 
       
   384     def _startPage(self):
   383         #now get ready for the next one
   385         #now get ready for the next one
   384         self._pageNumber = self._pageNumber + 1
   386         self._pageNumber = self._pageNumber+1
   385         self._restartAccumulators()
   387         self._restartAccumulators()
   386         self.init_graphics_state()
   388         self.init_graphics_state()
   387         self.state_stack = []
   389         self.state_stack = []
   388 
   390 
   389     def setPageCallBack(self, func):
   391     def setPageCallBack(self, func):