Tutorial :Python - Reportlab: Error using custom font



Question:

Im using the reportlab framework for creating pdf's. I'm also using a custom font in my pdf's called '3of9'. Now, sometimes I'm getting the following error:

IOError: Cannot open resource "/usr/lib/python2.6/site-packages/reportlab/fonts/LeERC___.AFM", while looking for faceName='3of9'

This doesn't happens everytime, but too often. And in most of the cases everything works well, so I have no idea why the error comes up.

Has anyone an idea how to solve this?


Solution:1

either make sure you have LeERC___.AFM at the given path or try to upgrade to a more recent reportlab version.

LeERC___.AFM is part of the reportlab distribution to version 2.1 (which can be downloaded at http://www.reportlab.com/ftp/ReportLab_2_1.zip)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »