[reportlab-users] Embedding Platypus Story in Canvas

Rich Shepard rshepard at appl-ecosys.com
Mon Nov 5 21:13:13 EST 2007


On Mon, 5 Nov 2007, Tim Roberts wrote:


> By default, the "build" method calls Canvas.save() to generate the PDF,

> but you can override that by setting doc._doSave = 0. Then you can do

> doc.canv.showPage() and start drawing more stuff.


This is interesting, Tim. At the end of the first page I have:

doc.build(story)
doc._doSave = 0
pg.showPage()

then I go on to the next page. But, only that first page is in the resulting
.pdf file. If, on the second page, I put a 'print' statement, that is
processed. The second page concludes with:

pgnum = pg.getPageNumber()
pg.drawCentredString(self.PAGE_SIZE[0]/2,36,str(pgnum-1))
pg.showPage()

but it's not in the output. No python error messages are produced.

Have you debugging suggestions?

Thanks again,

Rich

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863


More information about the reportlab-users mailing list