[reportlab-users] two columns page
Nicholas Wieland
nicholas_wieland at yahoo.it
Tue Aug 9 12:12:13 EDT 2005
Hi *, sorry for flooding the list, it seems that everyday I have a new problem :)
Now I'm battling with a two columns layout. What I understood is that I have to use frames inside PageTemplates (that's why I can't use SimpleDocTemplate, as suggested in another thread). I think I figured out how to do what I want, but for reasons I don't really understand, every flowable is added to the right frame, and the left frame is completely empty.
head = Frame (x1 = 0, y1 = defaultPageSize [1] - 160, width = defaultPageSize [0], height = 40)
sx_frame = Frame (x1 = 0, y1 = 80, width = defaultPageSize [0] // 2, height = defaultPageSize [1] - 120)
dx_frame = Frame (x1 = defaultPageSize [0] // 2, y1 = 80,
width = defaultPageSize [0] // 2, height = defaultPageSize [1] - 120)
two_columns_page = PageTemplate (id = "twocol", frames = [dx_frame, sx_frame], onPage = pageHeader, onPageEnd = pageFooter)
report_doc = BaseDocTemplate (filename = ptf_code + reference_date.replace ('/', '') + '.pdf', pageTemplates = [cover_page, page, two_columns_page])
[...other things....]
report_story.append (NextPageTemplate ("twocol"))
report_story.append (PageBreak ())
report_story.append (Title ("Asset Allocation"))
report_story.append (Spacer (width = defaultPageSize [0], height = 30))
report_story.append (asset_nav_table)
report_story.append (asset_tth_table)
Title gets the full width of the page (as in head), asset_nav_table should be on the left, asset_tth_table on the right.
What kind of idiotic mistake have I done this time ?
TIA,
ngw
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20050809/d015d9fc/attachment.html
More information about the reportlab-users
mailing list