This commit is contained in:
sanj 2010-05-14 04:32:10 +05:30
parent a1a193ca85
commit a64bfc5239

View File

@ -523,7 +523,7 @@ def page_pdf(request):
print_width_mm = article.product.typ.print_width print_width_mm = article.product.typ.print_width
print_height_mm = int(print_width_mm // article.product.typ.aspect_ratio) print_height_mm = int(print_width_mm // article.product.typ.aspect_ratio)
output_path = MEDIA_ROOT + "/pdf/tmpPDF" + article_id + page_id + ".pdf" output_path = MEDIA_ROOT + "/pdf/tmpPDF" + article_id + page_id + ".pdf"
cmd = "wkhtmltopdf --page-width %d --page-height %d 'http://localhost/edit/view_article/%s/?m=%f&p=%s' '%s'" % (print_width_mm, print_height_mm, article_id, m, page_id,output_path,) cmd = "wkhtmltopdf --page-width %d --page-height %d 'http://edgwareroad.org/edit/view_article/%s/?m=%f&p=%s' '%s'" % (print_width_mm, print_height_mm, article_id, m, page_id,output_path,)
os.system(cmd) os.system(cmd)
return HttpResponseRedirect(output_path.replace(MEDIA_ROOT, "/static")) return HttpResponseRedirect(output_path.replace(MEDIA_ROOT, "/static"))