[reportlab-users] Best way forward

Steve Romanow slestak989 at gmail.com
Wed Aug 11 13:08:40 EDT 2010


On 8/11/2010 1:04 PM, Simon wrote:

> Hello All

>

> I am trying to find the best way forward to produce pdf invoices with

> Reportlab. I have created a few pds with PLATYPUS but am having

> problems working this one out. I haven't quite setteled into

> Reportlab's way of thinking.

>

> They are going to be printed on continus paper that is perferated

> every 20cm. If a invoice is too large to fit on one page it should

> continue onto the second page as if it is the same piece of paper.

> e.g. the second page should not have a header. I think it would be

> easer to create one large page (40cm high) rather then two seperate

> ones. Is it posible to create a pdf page (PageTemplate) with a

> flexable height? or change the height if I calculate that the

> flowables wont fit (Most likely be one table per invoice).

>

> Here comes the wedge: There is a piece of text that has to come below

> the invoice item table. If the pdf needs to be printed on two pages it

> should not get printed on the bottom of the first page but the second.

>

> Is it posible to wrap two flowables in a flowable that can not be split?

>

> My other question is: Is it posible when a PageTemplate is drawing the

> static elements on the page to grab information from the first

> flowable to be drawn on that page. Related to that is it posible to

> store extra data in a

> flowable.p://two.pairlist.net/mailman/listinfo/reportlab-users

I don't have a specific RL answer for you, however, I have had to handle
this with some other products so lets just talk concepts. I will need
to tackle this one day in RL (I hope, if my company purchases).

You need 4 layouts, Single, First, Middle, Last.

Single will have Header, Detail Footer
First will have Header and Detail
Middle will only have Detail (maybe a mini header, but different than First)
Last will have Detail and Footer




More information about the reportlab-users mailing list