[reportlab-users] registering font does not work after switching media server
Roberto Alsina
ralsina at netmanagers.com.ar
Thu Mar 25 07:07:58 EDT 2010
On Thursday 25 March 2010 08:00:09 Thomas Kremmel wrote:
> Hi,
>
> I m developing a django app using reportlab. Till now I just used the
> django development server to serve all media files, including some ttf
> fonts to be registered by reportlab. I do it like this:
>
> pdfmetrics.registerFont(TTFont('Calibri', settings.MEDIA_URL +
> 'fonts/calibri.ttf'))
>
> That worked fine till I switched from the django development server to
> apache production server. Now I'm getting the error:
>
> TTFError at /accounting/export/do/
>
> Not a TrueType font: version=0x3C21444F
>
>
> This is strange since it does work with the development server and
> using the apache server i get an error from reportlab.. humm. this
> error should not be related to the server, but somehow it seems to
> be...
>
>
> ah yes.. The links to the fonts seem to be correc
If you are using a red hat variant or clone, and the font is outside /var/www
it may be that SELinux is not letting you read the file?
More information about the reportlab-users
mailing list