0

Possible Duplicate:
Transparency in PNGs with reportlab 2.3

I'm trying to write Images in PDF via the reportlab module. This works perfect, however whenever I try to insert transparant images it turns black in the PDF page. Anyone knows how to fix this?

from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib.colors import *
from reportlab.lib.units import cm, mm, inch, pica
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle

pdf = Canvas(AnalysisReport.pdf', pagesize = letter)
pdf.setFont("Helvetica-Bold", 45)
pdf.setFillColor('#000000')
pdf.drawCentredString(inch *4.25, inch *10.00, "Qualitative Analysis Report")
pdf.drawInlineImage("\Glycaan8_78974.png", 500, 500)
pdf.showPage()
pdf.save()
Community
  • 1
  • 1
Coryza
  • 231
  • 1
  • 3
  • 12

0 Answers0