[reportlab-users] pb with images

Jerome Alet alet at librelogiciel.com
Wed Dec 14 13:57:09 EST 2005


On Wed, Dec 14, 2005 at 06:10:38PM +0000, Robin Becker wrote:
> 
> Anyhow it seems Jerome has found a proper bug when Acroreader 7.0 tries to 
> draw 0 x 0 images.

There's this code :

        if width is None:
            width = imgObj.width
        if height is None:    
            height = imgObj.height
            
in canvas.py's drawImage() method.

maybe doing this instead (untested) would fix the problem :

        if not width :
            width = imgObj.width
        if not height :    
            height = imgObj.height
            
I'm now struggling with masks to render parts of images transparent, 
this used to work but doesn't seem to work anymore. To my knowledge 
the only thing I changed was Acroread (from 5.x to 7.0)... 

Also I've just seen in Acrobat Reader's preferences that PDF files
with layers exist. Is there an API in ReportLab to create multilayered
PDF documents ?

Thx for your time

Jerome Alet


More information about the reportlab-users mailing list