* src/docgen/PdfDoc.py: handle iso-8859-1 characters
svn: r2666
This commit is contained in:
parent
94a9518c64
commit
d19da4e173
@ -199,7 +199,7 @@ class PdfDoc(BaseDoc.BaseDoc):
|
|||||||
|
|
||||||
def end_paragraph(self):
|
def end_paragraph(self):
|
||||||
if self.in_table == 0 and self.image == 0:
|
if self.in_table == 0 and self.image == 0:
|
||||||
self.story.append(Paragraph(self.text,self.current_para))
|
self.story.append(Paragraph(self.text.encode('iso-8859-1'),self.current_para))
|
||||||
else:
|
else:
|
||||||
self.image = 0
|
self.image = 0
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ class PdfDoc(BaseDoc.BaseDoc):
|
|||||||
fc = make_color(font.get_color())
|
fc = make_color(font.get_color())
|
||||||
s = reportlab.graphics.shapes.String(x*cm,
|
s = reportlab.graphics.shapes.String(x*cm,
|
||||||
yt,
|
yt,
|
||||||
str(text),
|
text.encode('iso-8859-1'),
|
||||||
fontName=fnt,
|
fontName=fnt,
|
||||||
fontSize=font.get_size(),
|
fontSize=font.get_size(),
|
||||||
strokeColor=sc,
|
strokeColor=sc,
|
||||||
@ -532,7 +532,7 @@ class PdfDoc(BaseDoc.BaseDoc):
|
|||||||
for text in lines:
|
for text in lines:
|
||||||
s = reportlab.graphics.shapes.String(start_x*cm,
|
s = reportlab.graphics.shapes.String(start_x*cm,
|
||||||
start_y*cm,
|
start_y*cm,
|
||||||
str(text),
|
text.encode('iso-8859-1'),
|
||||||
fontName=fnt,
|
fontName=fnt,
|
||||||
fontSize=size,
|
fontSize=size,
|
||||||
strokeColor=sc,
|
strokeColor=sc,
|
||||||
@ -551,7 +551,7 @@ class PdfDoc(BaseDoc.BaseDoc):
|
|||||||
for text in lines:
|
for text in lines:
|
||||||
s = reportlab.graphics.shapes.String(start_x,
|
s = reportlab.graphics.shapes.String(start_x,
|
||||||
start_y,
|
start_y,
|
||||||
str(text),
|
text.encode('iso-8859-1'),
|
||||||
fontSize=size,
|
fontSize=size,
|
||||||
strokeColor=sc,
|
strokeColor=sc,
|
||||||
fillColor=fc,
|
fillColor=fc,
|
||||||
|
Loading…
Reference in New Issue
Block a user