[reportlab-users] Newbie Question on Landscape Tables...
Jared Carlson
jared.carlson23 at gmail.com
Mon Jan 23 16:13:55 EST 2012
Ok,
So I'm working with report lab and for the most part getting things to work
well, but landscape with a table is killing me.
So I create a couple of frames and define a _landscape function, which just
rotates the canvas... I should add that "BuildTable( ... )" builds a
table...
pframe = Frame(1*cm,1*cm,14*cm,22.7*cm)
ptemplate = PageTemplate('myportrait',[pframe] )
lframe = Frame(1*cm,1*cm,22.7*cm,14*cm)
ltemplate = PageTemplate('mylandscape',[lframe],onPage=_landscape )
And then I insert a:
els.append(NextPageTemplate('mylandscape'))
els.append( BuildTable(csvfile ) )
The table DOES cover multiple pages, but what I see is the first page is
still portrait, and then the second page is landscape, I inserted a page
break thinking that maybe the table was being started on a new page... so...
els.append(Pagebreak())
els.append( NextPageTemplate('mylandscape'))
els.append( BuildTable(csvfile) )
But other than a blank page before my table... nothing else and so I'm
wondering why my table doesn't rotate, and only part of it does...
Can anyone share some insight?? Thanks
- Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120123/1cb1ef19/attachment.html>
More information about the reportlab-users
mailing list