From f08407c3b9e2c2450e0a29822f9ff9c4699bff77 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 21 Jun 2011 01:18:51 +0530 Subject: [PATCH] trying to fix pdf generation bug --- edgware/editor/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 608fea3..69644ce 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -17,7 +17,7 @@ from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT, PROJECT_PATH from PIL import Image import os from print_pdf import print_url_list - +import math @login_required def editor(request): @@ -626,7 +626,7 @@ def product_pdf(request): width_mm = request.GET['width'] else: width_mm = product.typ.print_width - height_mm = int(width_mm // product.typ.aspect_ratio) + height_mm = math.ceil(width_mm // product.typ.aspect_ratio) pages = product.get_page_list() m = product.get_print_multiplier(dpi) url_list = []