From 53cdc41780831052b690858b9b7d7155ed1a2279 Mon Sep 17 00:00:00 2001 From: sanj Date: Thu, 25 Mar 2010 20:32:21 +0530 Subject: [PATCH] forgot to add print_pdf --- edgware/editor/print_pdf.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 edgware/editor/print_pdf.py diff --git a/edgware/editor/print_pdf.py b/edgware/editor/print_pdf.py new file mode 100644 index 0000000..662dc42 --- /dev/null +++ b/edgware/editor/print_pdf.py @@ -0,0 +1,9 @@ +import os + +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, clean_urls.join(" "), output_path,) + os.system(cmd) + return output_path