[reportlab-users] rotate bug? or I' missing somethings...

pier carteri pier.carteri at gmail.com
Fri Oct 20 05:24:25 EDT 2006


Hi to the list,
first of all, I want to say a big thank you to all the Reportlab guys. Your
libs rocks and simplify my day-to-day developer life a lot!
It is really a pleasure to create pdf with this tecnology!

Now back to the subject of this mail:
probably I' ve not undestand somethings of the rotate method in canvas
object (or maybe is a bug ).
Consider the code

from reportlab.pdfgen import canvas
import reportlab.lib.pagesizes as ps
c = canvas.Canvas("test.pdf")
c.setFont("Times-Roman", 60)
c.drawCentredString(ps.A4[0]/2, ps.A4[1]/2, "Confidential")
c.save()


This create the pdf test_1.pdf as expected. Now if I add a rotate:

from reportlab.pdfgen import canvas
import reportlab.lib.pagesizes as ps
c = canvas.Canvas("test.pdf")
c.setFont("Times-Roman", 60)
c.rotate(45)
c.drawCentredString(ps.A4[0]/2, ps.A4[1]/2, "Confidential")
c.save()

I expect to have the same output but with the string rotate of 45, but I
obtain the test_2.pdf output

What's wrong?

Thank you!

Pier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20061020/2c5ccd5e/attachment.html


More information about the reportlab-users mailing list