From 36fcc7e11b3a4688d82fe353297e090507e11f4a Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 6 Jul 2011 19:28:57 +0530 Subject: [PATCH] wtf? --- edgware/editor/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index fa94bc1..36ffb0b 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -650,8 +650,7 @@ def article_pdf(request): article = get_object_or_404_json(Article, pk=a_id) dpi = request.GET.get('dpi', 600) width_mm = request.GET.get('width', article.typ.print_width) - width_mm = width_mm + .0 - height_mm = math.ceil(width_mm / article.typ.aspect_ratio) + height_mm = int(round(width_mm / article.typ.aspect_ratio)) pages = Page.objects.filter(article=article).order_by('page_no') m = article.get_print_multiplier(dpi) url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m)