[reportlab-users] save roomplans as pdf
Robin Becker
robin at reportlab.com
Wed Sep 20 08:41:04 EDT 2006
Thomas Heidmann wrote:
> gif - format
>
> 2006/9/20, Robin Becker <robin at reportlab.com>:
>>
>> Thomas Heidmann wrote:
>> > hello,
>> > im new to this and i want to convert roomplans, that are on a website,
>> to
>> > pdf. the user shall have the posibility to save the roomplans as pdf.
>> can
>> > somebody hep me with the first steps`please?
>> >
>> > Best Regards
>> > Thomas
>>
>> what format are the current plans in?
>> --
>> Robin Becker
The ReportLab toolkit allows you to add an image to a canvas. Effectively you
need to do the following
from reportlab.pdfgen.canvas import Canvas
c = Canvas('myplan.pdf',pagesize=(myplanwidth,myplanheight))
c.drawImage('myplan.gif',0,0)
c.save()
where myplanwidth and myplanheight are the dimensions.
--
Robin Becker
More information about the reportlab-users
mailing list