[reportlab-users] Newbie Page Breaks

Graeme reportlab-users@reportlab.com
Thu, 23 Sep 2004 16:50:02 +1000


This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C4A18D.5EA32F70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

G'day


I downloaded reportlab this morning as I need to generate order PDFs.

I have read the doco but am still a bit confused and I have searched the =
net looking for a complete example

There is a definite problem with my understanding. Obviously reportlab =
does not auto generate page breaks so I have to do it.
My content list has about 200 order items in it but it only writes to =
one page.

For example:

c =3D canvas.Canvas(filename)
c.setPageCompression(0)
   =20
textobject =3D c.beginText()
textobject.setTextOrigin(5, 800)
textobject.setFont("Courier", 8)
textobject.textLines("\r\n".join(content))
c.drawText(textobject)
doc.multiBuild(story)
c.save()

Can anyone help with some pointers on how one controls page break, I am =
also confused as to which base class
should be used to generate a simple PDF

many thanks, and lastly this is an awesome product !!!!!!
------=_NextPart_000_000C_01C4A18D.5EA32F70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>G'day</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I downloaded reportlab this morning as =
I need to=20
generate order PDFs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have read the doco but am still a bit =
confused=20
and I have searched the net looking for a complete example</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is a definite problem with my =
understanding.=20
Obviously reportlab does not auto generate page breaks so I have to do=20
it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>My content list has about 200 order =
items in it but=20
it only writes to one page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For example:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>c =3D=20
canvas.Canvas(filename)<BR>c.setPageCompression(0)<BR>&nbsp;&nbsp;&nbsp;&=
nbsp;<BR>textobject=20
=3D c.beginText()<BR>textobject.setTextOrigin(5,=20
800)<BR>textobject.setFont("Courier", 8)</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>textobject.textLines("\r\n".join(content))<BR>c.drawText(textobj=
ect)<BR>doc.multiBuild(story)<BR>c.save()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone help with some pointers on =
how one=20
controls page break, I am also confused as to which base =
class</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>should be used to generate a simple=20
PDF</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>many thanks, and lastly this is an =
awesome product=20
!!!!!!</FONT></DIV></BODY></HTML>

------=_NextPart_000_000C_01C4A18D.5EA32F70--