[reportlab-users] Changeing page orientation of canvas.

Ian Sparks reportlab-users@reportlab.com
Fri, 1 Nov 2002 17:20:25 -0500


Ok, the same code with an _.

No discernable difference. Perhaps you could try this code jerome and =
see what you get?

# Reportlab imports
from reportlab.pdfgen import canvas
from reportlab.lib.units import inch, cm
from reportlab.lib.pagesizes import A4,letter
from reportlab.lib import colors


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

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

c._pageSize =3D 100,100
c.drawString(0.3*inch,0.3*inch,'Blargh Yack!')
c.showPage()
c.save()

Thanks.

- I.

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


On Fri, Nov 01, 2002 at 04:57:53PM -0500, Ian Sparks wrote:
> Hmm..I tried to do :
>=20
> c =3D canvas.Canvas("hello.pdf",pagesize=3Dletter)
>=20
> c.drawString(0.3*inch,0.3*inch,'Hello world')
> c.showPage()
>=20
> c.pageSize =3D 200,200 #Change that page size
> c.drawString(0.3*inch,0.3*inch,'Hello world')
> c.showPage()
> c.save()
>=20
> this runs but my second page is still letter size. What did I miss?

an underscore ???

that's c._pagesize as reported by the pdfgen/canvas.py file in=20
the __init__ method

not sure if this is present in the documentation

hth

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