ok, round px values, this is the final possibility......

This commit is contained in:
Sanj 2011-07-06 18:17:01 +05:30
parent 372656c937
commit 0688c0313d
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ def addPx(val):
''' '''
Adds 'px' to an integer value for a CSS property from DB 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 return r
def cleanCSS(prop): def cleanCSS(prop):

View File

@ -652,8 +652,8 @@ def article_pdf(request):
width_mm = request.GET.get('width', article.typ.print_width) width_mm = request.GET.get('width', article.typ.print_width)
height_mm = int(round(width_mm + .0 / 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') pages = Page.objects.filter(article=article).order_by('page_no')
m = int(round(article.get_print_multiplier(dpi))) + 2 # FIXME: stupid. m = article.get_print_multiplier(dpi)
url = SITE_BASE + "/edit/view_article/%d/?m=%d" % (article.id, m) url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m)
url_list = [url] url_list = [url]
''' '''
url_list = [] url_list = []