From 0bb0255531afd8f3d39d0e016d84609f9955dc1a Mon Sep 17 00:00:00 2001 From: sanj Date: Thu, 29 Jul 2010 01:40:23 +0530 Subject: [PATCH] try setting dpi --- edgware/editor/print_pdf.py | 4 ++-- edgware/editor/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/edgware/editor/print_pdf.py b/edgware/editor/print_pdf.py index 671ecf5..b82df97 100644 --- a/edgware/editor/print_pdf.py +++ b/edgware/editor/print_pdf.py @@ -1,10 +1,10 @@ import os -def print_url_list(urls, width, height, output_path): +def print_url_list(urls, width, height, dpi, output_path): clean_urls = [] for u in urls: clean_urls.append(u) - cmd = "wkhtmltopdf --page-width %d --page-height %d %s '%s'" % (width, height, " ".join(clean_urls), output_path,) + cmd = "wkhtmltopdf --page-width %d --page-height %d -d %d %s '%s'" % (width, height, dpi, " ".join(clean_urls), output_path,) # print cmd os.system(cmd) return output_path diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 027559c..49a1109 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -592,7 +592,7 @@ def article_pdf(request): url_list.append(url) ''' output_path = MEDIA_ROOT + "/pdf/" + article.name + "_" + str(article.current_revision()) + ".pdf" - pdf_path = print_url_list(url_list, width_mm, height_mm, output_path) + pdf_path = print_url_list(url_list, width_mm, height_mm, dpi, output_path) return HttpResponseRedirect(pdf_path.replace(MEDIA_ROOT, "/static")) def article_json(request):