Hi Rob, thank you for your answer, but I'm a newbie in Web application written in Python. Now I try your suggestion ...
Thanks Perseo Rob Wolfe wrote: > "Perseo" <[EMAIL PROTECTED]> writes: > > > Hi guys, > > > > I'm disprate with the Pdf Unicode. I try to create a class using ufpdf > > but some chars are not correct and now I would like try Python because > > a friend tolds me that it's very powerful. > > I need a simple script in Python that grab all Records from a MySql > > table and print in the pdf file. > > > > The languages stored in my db are about 25 and they are: > > Greek English French Hungarian Italian Lithuanian Dutch Portuguese > > Albanian > > Czech Danish German Spanish Estonian Finnish Irish Latvian Maltese > > Polish Romanian > > Russian Slovene Slovak Swedish > > You can give reportlab [1] a try. It has support for TrueType fonts > and unicode translation using UTF-8. I used to use it for pdf files > with polish chars. > > Some example code: > > <code> > from reportlab.pdfbase import pdfmetrics > from reportlab.pdfbase.ttfonts import TTFont > from reportlab.pdfgen import canvas > > pdfmetrics.registerFont(TTFont('Verdana', 'Verdana.ttf')) > c = canvas.Canvas("pl.pdf") > c.setFont("Verdana", 12) > c.drawString(100, 600, "Witaj, ¶wiecie!".decode("iso-8859-2").encode("utf-8")) > c.showPage() > c.save() > </code> > > > [1] http://www.reportlab.org/ > > -- > HTH, > Rob -- http://mail.python.org/mailman/listinfo/python-list