[reportlab-users] (no subject)

Ian Sparks reportlab-users@reportlab.com
Mon, 9 Feb 2004 09:18:06 -0500


This is a multi-part message in MIME format.

------_=_NextPart_001_01C3EF17.8964E215
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

I must confess to being no expert with Unicode issues especially where =
they interact with ReportLab and PDF. I'm trying to get a PDF with =
Polish accented characters from the following program :

x =3D u"Oddzia=B3 Dzieci=EAcy Chor=F3b W=B1troby"
x =3D x.encode('iso-8859-2','strict') #What encoding does a u"text" =
string end up in by default?
=20
from reportlab.pdfgen import canvas
c =3D canvas.Canvas("test.pdf")
c.setFont('Courier',12) #Am I going to need a "Polish character aware" =
font? Any resources for this?
c.drawString(40,700,x)
c.showPage()
c.save()

Also, if anyone has experience with Polish perhaps they could tell me =
whether it is acceptable to "downgrade" the Polish characters to their =
latin-1 equivalents?

Any advice would be appreciated. Thank you.=20

- Ian Sparks.


------_=_NextPart_001_01C3EF17.8964E215
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-2">
<TITLE></TITLE>

<META content=3D"MSHTML 5.00.3523.1700" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><FONT size=3D2>
<P>I must confess to being no expert with Unicode issues especially =
where they=20
interact with ReportLab and PDF. I'm trying to get&nbsp;a PDF with =
Polish=20
accented characters from the following program :</FONT></FONT></P></DIV>
<DIV><FONT face=3DArial size=3D2>x =3D u"Oddzia=B3 Dzieci=EAcy Chor=F3b =
W=B1troby"<BR>x =3D=20
x.encode('iso-8859-2','strict') #What encoding does a u"text" string end =
up in=20
by default?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>from reportlab.pdfgen import =
canvas<BR>c =3D=20
canvas.Canvas("test.pdf")<BR>c.setFont('Courier',12) #Am I going to need =
a=20
"Polish character aware" font? Any resources for=20
this?<BR>c.drawString(40,700,x)<BR>c.showPage()<BR>c.save()<BR></FONT><FO=
NT=20
size=3D2></FONT></DIV>
<DIV><FONT size=3D2>Also, if anyone has experience with Polish perhaps =
they could=20
tell me whether it is acceptable to "downgrade" the Polish characters to =
their=20
latin-1 equivalents?</FONT></DIV>
<DIV>
<P><FONT size=3D2>Any advice would be appreciated. Thank you. =
</FONT></P>
<P><FONT size=3D2>- Ian Sparks.</FONT></P></DIV></BODY></HTML>

------_=_NextPart_001_01C3EF17.8964E215--