[reportlab-users] Using images in a Drawing
    Robin Becker 
    robin at reportlab.com
       
    Thu Jan 12 05:54:54 EST 2006
    
    
  
Dinu Gherman wrote:
> Hi,
> 
> I haven't been using RL for a while... Whats wrong with the
> code below, trying to use images in a Drawing object?
> 
> Adding the image makes a difference to the size of the re-
> sulting PDF, but it is not visible anywhere.
> 
> Thanks,
> 
> Dinu
> 
> 
> from reportlab.graphics import shapes, renderPDF
> d = shapes.Drawing(400, 200)
> img = shapes.Image(0,0, 200,100, "image.jpg")
> d.add(img)
> renderPDF.drawToFile(d, "image.pdf")
......
I just tried this with a simple image
and get the expected result (at least with trunk revision).
-- 
Robin Becker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imageinpdf.zip
Type: application/octet-stream
Size: 9499 bytes
Desc: not available
Url : http://two.pairlist.net/pipermail/reportlab-users/attachments/20060112/7e7ea772/imageinpdf-0001.obj
    
    
More information about the reportlab-users
mailing list