[reportlab-users] registering font does not work after switching media server
Thomas Kremmel
thomasspin at gmail.com
Thu Mar 25 07:09:37 EDT 2010
Thanks for your answer.
I'm using win xp and I can download the font via the web-browser. Thus it
seems that the apache does serve the file correctly. At least via the
web-browser.
2010/3/25 Roberto Alsina <ralsina at netmanagers.com.ar>
> 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?
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100325/1cd7628a/attachment.html>
More information about the reportlab-users
mailing list