[reportlab-users] Changeing page orientation of canvas.

Ian Sparks reportlab-users@reportlab.com
Fri, 1 Nov 2002 16:57:53 -0500


Hmm..I tried to do :

c =3D canvas.Canvas("hello.pdf",pagesize=3Dletter)

c.drawString(0.3*inch,0.3*inch,'Hello world')
c.showPage()

c.pageSize =3D 200,200 #Change that page size
c.drawString(0.3*inch,0.3*inch,'Hello world')
c.showPage()
c.save()

this runs but my second page is still letter size. What did I miss?

- Ian Sparks.



-----Original Message-----
From: Jerome Alet [mailto:alet@librelogiciel.com]
Sent: Friday, November 01, 2002 4:50 PM
To: reportlab-users@reportlab.com
Subject: Re: [reportlab-users] Changeing page orientation of canvas.


On Fri, Nov 01, 2002 at 04:23:39PM -0500, Ian Sparks wrote:
> Hi,
>=20
> I have been using Rotate() to put "landscape" pages into an=20
> otherwise portrait document.=20

no, use the correct page size instead.

e.g. :=20

        pgsize =3D pagesizes.landscape(pagesizes.A4)

then use pgsize when creating your document or page

hth

Jerome Alet
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users