From 0688c0313d86e4f1580c9cff793ac02e0ebfcee4 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 6 Jul 2011 18:17:01 +0530 Subject: [PATCH] ok, round px values, this is the final possibility...... --- edgware/editor/models.py | 2 +- edgware/editor/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/edgware/editor/models.py b/edgware/editor/models.py index bdef087..2e70a6f 100644 --- a/edgware/editor/models.py +++ b/edgware/editor/models.py @@ -20,7 +20,7 @@ def addPx(val): ''' Adds 'px' to an integer value for a CSS property from DB ''' - r = str(int(val)) + "px" + r = str(int(round(val))) + "px" return r def cleanCSS(prop): diff --git a/edgware/editor/views.py b/edgware/editor/views.py index d1b6dd2..09ef10d 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -652,8 +652,8 @@ def article_pdf(request): width_mm = request.GET.get('width', article.typ.print_width) height_mm = int(round(width_mm + .0 / article.typ.aspect_ratio)) pages = Page.objects.filter(article=article).order_by('page_no') - m = int(round(article.get_print_multiplier(dpi))) + 2 # FIXME: stupid. - url = SITE_BASE + "/edit/view_article/%d/?m=%d" % (article.id, m) + m = article.get_print_multiplier(dpi) + url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m) url_list = [url] ''' url_list = []