testing pdf

This commit is contained in:
Sanj 2011-07-06 05:33:46 +05:30
parent 70680ca4bb
commit 3d9e69e23b

View File

@ -654,13 +654,13 @@ def article_pdf(request):
pages = Page.objects.filter(article=article).order_by('page_no') pages = Page.objects.filter(article=article).order_by('page_no')
m = article.get_print_multiplier(dpi) m = article.get_print_multiplier(dpi)
url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (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 = []
for p in pages: for p in pages:
url = SITE_BASE + "/edit/view_article/%d/?m=%f&p=%d" % (article.id, m, p.id) url = SITE_BASE + "/edit/view_article/%d/?m=%f&p=%d" % (article.id, m, p.id)
url_list.append(url) url_list.append(url)
'''
output_path = MEDIA_ROOT + "/pdf/" + article.name + "_" + str(article.current_revision()) + ".pdf" output_path = MEDIA_ROOT + "/pdf/" + article.name + "_" + str(article.current_revision()) + ".pdf"
pdf_path = print_url_list(url_list, width_mm, height_mm, dpi, output_path) pdf_path = print_url_list(url_list, width_mm, height_mm, dpi, output_path)
return HttpResponseRedirect(pdf_path.replace(MEDIA_ROOT, "/static")) return HttpResponseRedirect(pdf_path.replace(MEDIA_ROOT, "/static"))