[reportlab-users] pythonpoint and unicode?

Manic Miner reportlab-users@reportlab.com
Sun, 30 May 2004 10:30:27 -0600 (MDT)

 I am trying to automatically generate a printable(pdf) version of a dynamic web
page with text from a database, in unicode format (the aim being of having the
output independent of the language used in the html file).
 I expected python(point) to be the ideal solution given the fact that it
supports unicode, but there seems no way to get text in eg russian or hebrew to
display correctly. pythonpoint doesn't support ttf files (I think), so I tried to
convert the Arial and Lucida Unicode windows fonts using ttf2pt1 (gnuwin32
package). The result was a 25MB (!) pfb file + 2MB afm, which I suspect is not a
very good idea to embed in a web-downloaded document ;) Furthermore, with that
font file, I get the following error in _pfbCheck:
    raise ValueError, 'Bad pfb file\'%s\' expected chr(%d)chr(%d) at char %d, got
chr(%d)chr(%d)' %   fn,ord(PFB_MARKER),ord(m),p,ord(d[p]),ord(d[p+1]))
ValueError: Bad pfb file'arialuni.pfb' expected chr(128)chr(1) at char 137027,
got chr(128)chr(2)
 Fonts generated by transtype2 (a commercial win32 application) yield the same
error (but not at the same position in the font file) So right now I'm pretty
much out of ideas - am I doing it completely wrong? Or is utf-8 not supported by
reportlab / pythonpoint?

Thank you for any hints

We aim to please. Ourselves, mostly, but we do aim to please.

---- Msg sent via Spymac Mail - http://www.spymac.com