From 33ea652ed4f2c91b484c9901b5757e9942565ea8 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 6 Jul 2011 18:05:00 +0530 Subject: [PATCH] other small foo to try and fix damned pdf --- edgware/editor/views.py | 4 ++-- edgware/templates/view_article.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 77c79f3..34f645f 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -650,9 +650,9 @@ def article_pdf(request): article = get_object_or_404_json(Article, pk=a_id) dpi = request.GET.get('dpi', 300) width_mm = request.GET.get('width', article.typ.print_width) - height_mm = int(round(width_mm / article.typ.aspect_ratio)) + height_mm = int(round(width_mm + .0 / article.typ.aspect_ratio)) pages = Page.objects.filter(article=article).order_by('page_no') - m = article.get_print_multiplier(dpi) + m = int(round(article.get_print_multiplier(dpi)) url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m) url_list = [url] ''' diff --git a/edgware/templates/view_article.html b/edgware/templates/view_article.html index 18ad431..5ee2bf0 100644 --- a/edgware/templates/view_article.html +++ b/edgware/templates/view_article.html @@ -52,7 +52,7 @@ p { #imagebox{{p.id}}{{i.id}} img { height: {{ i.css.height|make_really_big:m }}; - width: {{ i.css.width|make_really_big:m }} + width: {{ i.css.width|make_really_big:m }}; } {% endfor %}