print maybe fixed?
This commit is contained in:
parent
7316898e56
commit
7a4f4fcbc9
|
@ -4,6 +4,7 @@ def print_url_list(urls, width, height, 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 %s '%s'" % (width, height, " ".join(clean_urls), output_path,)
|
||||
print cmd
|
||||
os.system(cmd)
|
||||
return output_path
|
||||
|
|
|
@ -586,9 +586,9 @@ def article_pdf(request):
|
|||
m = article.get_print_multiplier(dpi)
|
||||
url_list = []
|
||||
for p in pages:
|
||||
url = SITE_BASE + "/edit/view_article/%d/?m=%f&p=%d'" % (article.id, m, article.product.id)
|
||||
url = SITE_BASE + "/edit/view_article/%d/?m=%f" % (article.id, m)
|
||||
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".replace(" ", "")
|
||||
pdf_path = print_url_list(url_list, width_mm, height_mm, output_path)
|
||||
return HttpResponseRedirect(pdf_path.replace(MEDIA_ROOT, "/static"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user