From 0f42dd06fdf62a8efa562d9be58606f18d19231b Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sat, 30 Jun 2012 14:50:52 +0200 Subject: [PATCH] #234 take 75 chars at maximum --- openslides/utils/pdf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openslides/utils/pdf.py b/openslides/utils/pdf.py index d9e3a5009..6a120e7d6 100755 --- a/openslides/utils/pdf.py +++ b/openslides/utils/pdf.py @@ -210,7 +210,11 @@ def firstPage(canvas, doc): # page header (with event information) canvas.setFont('Ubuntu', 10) canvas.setFillGray(0.4) - canvas.drawString(2.75*cm, 28*cm, u"%s | %s" % (config["event_name"], config["event_description"])) + + title_line = u"%s | %s" % (config["event_name"], config["event_description"]) + if len(title_line) > 75: + title_line = "%s ..." % title_line[:70] + canvas.drawString(2.75*cm, 28*cm, title_line) if config["event_date"] and config["event_location"]: canvas.drawString(2.75 * cm, 27.6 * cm, u"%s, %s" % (config["event_date"], config["event_location"])) # time