[reportlab-users] How to change margins from page to page

Mike Driscoll mike at pythonlibrary.org
Fri Mar 14 09:58:22 EDT 2014


Hi,

I have a case where the first page of a document has two inches worth of
fixed header information and another 4 inches of data on the bottom of the
document that is taken up with a check. The middle 3 or 4 inches on the
first page is for dynamic flowable stuff, like a table and some paragraphs.
The first page works great.

I am using a bottom margin of 4 inches for it. However, I don't need to
have a bottom margin on any pages past the first page. How do I change the
margins for the rest of the document?

I tried adding this to my later pages method:

doc.bottomMargin = 0.5 * inch

But that doesn't have any effect. I also saw this post from a few years ago:

http://two.pairlist.net/pipermail/reportlab-users/2011-November/010262.html

But I'm not using Frames. Does anyone have any insights? I am using a
SimpleDocTemplate. Thanks!

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140314/a8f5e7a9/attachment.html>


More information about the reportlab-users mailing list