Fix TypError in PDF preview

This commit is contained in:
Raphael Michel
2017-09-13 14:59:19 +02:00
parent a9f131b645
commit fb3866aa1a

View File

@@ -150,7 +150,7 @@ class PdfTicketOutput(BaseTicketOutput):
alignment=align_map[o['align']] alignment=align_map[o['align']]
) )
p = Paragraph(self._get_text_content(op, order, o), style=style) p = Paragraph(self._get_text_content(op, order, o) or "", style=style)
p.wrapOn(canvas, float(o['width']) * mm, 1000 * mm) p.wrapOn(canvas, float(o['width']) * mm, 1000 * mm)
# p_size = p.wrap(float(o['width']) * mm, 1000 * mm) # p_size = p.wrap(float(o['width']) * mm, 1000 * mm)
ad = getAscentDescent(font, float(o['fontsize'])) ad = getAscentDescent(font, float(o['fontsize']))