[reportlab-users] Problem with transparent png's

Tamonash Roy tamonashroy at gmail.com
Thu Feb 5 02:32:24 EST 2009


Hi !
I've created a pdf document which has a lot of images in it. These images
are transparent png images. In my development machine I have windows with
python 2.5 and reportlab2.2, whereas in the server it is debian linux,
python2.5 and reportlab2.2. The problem is I have a perfect pdf document
while I use my development machine, but when the pdf is generated in the
server and downloaded, the transparent images have a black background. I got
to use these images in the document but dont know how. please help!

Sample code used to generate pdf is as follows:

f2 = Frame( inch*1.75, inch*7.6, inch*4.75, inch*2.95,
leftPadding=0, bottomPadding=0,rightPadding=0, topPadding=2, showBoundary=1)
f3 = Frame( inch*1.25, inch*5.75, inch*3.85, inch*1.7,
leftPadding=0, bottomPadding=0,rightPadding=0, topPadding=2, showBoundary=1)

mainPage = PageTemplate(frames=[f2, f3])
doc = BaseDocTemplate('report_1.pdf', pageTemplates=mainPage, leftMargin=72
,title=Title, author=Author, showBoundary=0)

story = []
story.append(Image("a.png"))
story.append(FrameBreak())
story.append(Image("b.png"))

doc.build(story)

Thanks,
Tamonash Roy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090205/0cce096a/attachment.html>


More information about the reportlab-users mailing list