[reportlab-users] reportlab on Debian

Brenda J. Butler bjb at credil.org
Fri May 31 17:47:38 EDT 2013

My question is related to how reportlab (and fonts) are packaged on Debian.
I realize I may not get the answer here, if someone knows a better place to ask this please
let me know. The actual questions are at the bottom of the email.

I upgraded my machine from Debian Squeeze to Debian Wheezy (the old stable to the new one).
I re-ran a test program which calculates a few plots, and then ran the python
script I had to draw those plots so I could view them and compare them. That python
script uses reportlab to generate the graphics and used to work fine before the upgrade.

The python script failed with the following error:

Warn: Can't find .pfb for face 'Times-Roman'
Traceback (most recent call last):
File "./graphtestease.py", line 193, in <module>
linechart (args.which)
File "./graphtestease.py", line 164, in linechart
binaryStuff = alc.asString('png')
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/shapes.py", line 780, in asString
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 656, in drawToString
drawToFile(d,s,fmt=fmt, dpi=dpi, bg=bg, configPIL=configPIL)
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 651, in drawToFile
c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL, showBoundary=showBoundary)
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 637, in drawToPMCanvas
draw(d, c, 0, 0, showBoundary=showBoundary)
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 50, in draw
R.draw(renderScaledDrawing(drawing), canvas, x, y, showBoundary=showBoundary)
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderbase.py", line 198, in draw
self.initState(x,y) #this is the push()
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 93, in initState
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 87, in applyState
self._canvas.setFont(s['fontName'], s['fontSize'])
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 368, in setFont
File "/usr/lib/python2.7/dist-packages/reportlab/graphics/renderPM.py", line 221, in _setFont
raise RenderPMError, "Can't setFont(%s) missing the T1 files?\nOriginally %s: %s" % (fontName,s1,s2)
reportlab.graphics.renderPM.RenderPMError: Can't setFont(Times-Roman) missing the T1 files?
Originally <type 'exceptions.TypeError'>: makeT1Font() argument 2 must be string, not None
make: *** [run_testease_a] Error 1

So I remembered that I'm supposed to download pfbfer.zip and install it in a certain place, and
maybe edit rl_config.py.

But, pfbfer.zip doesn't seem to be available any more? these links produce html instead of zipfiles:


So my questions are (I found some answers and put in the answers I found, maybe other people can
find these answers some day - there are still unanswered questions).

1) Where did pfbfer.zip go? - where can I get them?

Aha, they have moved from .org to .com. Also, the www part of the
www.reportlab.com domain is required if you want to get these files:


2) Why do those two files have the same name? Are they different files or the same file?
If the same, why do people say I need both?

They are the same file.

"people say need both" For example: http://john.parnefjord.se/node/51

I note that DarkGarden is not in these files. Did one of them used to contain DarkGarden?

3) I already have the contents of those files (that file?) in python2.5 and python2.6,
shouldn't they be packaged such that it doesn't matter what version of python/reportlab
I have, (I'm assuming the fonts haven't changed much if at all over the python/reportlab
versions - perhaps I'm wrong?)?

4) Can I just copy the contents of the fonts directory over to the python2.7 reportlab
install to make it work again? or should I just move the pfbfer-generated directory
somewhere and update the rl_config.py file when I install new versions?


}{ Centre for Research and Experimental Development in Informatics Libre

Brenda J. Butler
bjb at credil.org
+1 613 693 0684 #3202
F3018 - 283 Alexandre Taché
Gatineau (QC) J9A 1L8 CANADA
Sustainable Innovation // Innovation Durable

More information about the reportlab-users mailing list