reportlab

Reportlab Insert horizontal line in table

Reportlab Insert horizontal line in table Question: I know about the LINEABOVE and LINEBELOW styles, i was wondering if there is a way to draw a line in the table with a specified width. I’m trying to add a line that does not ‘touch’ the border of the table, LINEABOVE would work perfectly if i …

Total answers: 3

How to change text/font color in reportlab.pdfgen

How to change text/font color in reportlab.pdfgen Question: I want to use a different color of text in my auto-generated PDF. According to the reportlab docs all I need to do is: self.canvas.setFillColorRGB(255,0,0) self.canvas.drawCentredString(…) But that doesn’t do anything. The text is black no matter what. Asked By: Goro || Source Answers: I can’t verify …

Total answers: 4

How to set any font in reportlab Canvas in python?

How to set any font in reportlab Canvas in python? Question: I’m using reportlab to create pdfs. When I try to set a font using the following method, I get a KeyError: pdf = Canvas(‘test.pdf’) pdf.setFont(‘Tahoma’, 16) But if I use ‘Courier’ instead of ‘Tahoma’ there isn’t a problem. How can I use Tahoma? Asked …

Total answers: 3

Wrap text in a table reportlab?

Wrap text in a table reportlab? Question: I use a table but, I draw in in a canvas to control the position of the flowables, this because I have a template in a pdf, an I merge with pyPDF. The wrap is done in a table but the text go up, not down that’s what …

Total answers: 4

ReportLab and Python Imaging Library images from memory issue

ReportLab and Python Imaging Library images from memory issue Question: I’ve run into an issue I can’t seem to figure out with PIL and reportlab. Specifically, I would like to use drawImage on a canvas in reportlab using a PIL Image object. In the past I’ve inserted images into reportlab documents from the web using …

Total answers: 4

Transparency in PNGs with reportlab 2.3

Transparency in PNGs with reportlab 2.3 Question: I have two PNGs that I am trying to combine into a PDF using ReportLab 2.3 on Python 2.5. When I use canvas.drawImage(ImageReader) to write either PNG onto the canvas and save, the transparency comes out black. If I use PIL (1.1.6) to generate a new Image, then …

Total answers: 3