[reportlab-users] (Solved) Calling canvas.save() repeatedly causes multi-page PDF irregularities

Robin Becker robin at reportlab.com
Tue Aug 2 09:59:17 EDT 2016

On 02/08/2016 14:37, Tim Meneely wrote:
> Follow-up to my own post: Note that the documentation is clear enough on
> the use of canvas.save() - it says things such as "After this operation the
> canvas must not be used further."
> I suppose I learn more by reading examples, and the first several examples
> are one page.
> Tim
to be specific is no bad thing, anyhow at the end of pages you need to call 
canvas.showPage(). That sets up everything for the next page and also handles 
stuff like cross hairs and print margins etc etc.

I'm amazed that chrome manages to make sense of this, but also that we don't 
have a trap in the canvas save that makes the existing canvas effectively a 
no-op. Not really sure what things should be forbidden. Certainly anything that 
modifies state is a no-no.
Robin Becker

More information about the reportlab-users mailing list