From ca8b99207a8a135ea1b970bd610ac8fa8fe2741a Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 2 Mar 2016 03:49:59 -0800 Subject: Pass filename as string instead of a list. Modify comment to explain. --- wkhtmltopdf/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py index 94af5de..c871bd0 100644 --- a/wkhtmltopdf/utils.py +++ b/wkhtmltopdf/utils.py @@ -113,8 +113,8 @@ def convert_to_pdf(filename, header_filename=None, footer_filename=None, cmd_opt # Clobber header_html and footer_html only if filenames are # provided. These keys may be in self.cmd_options as hardcoded # static files. - # The argument `filename` should be a list. However, wkhtmltopdf will - # coerce into a list if a string is passed. + # The argument `filename` may be a string or a list. However, wkhtmltopdf + # will coerce it into a list if a string is passed. cmd_options = cmd_options if cmd_options else {} if header_filename is not None: @@ -180,7 +180,7 @@ def render_pdf_from_template(input_template, header_template, footer_template, c ) footer_filename = footer_file.filename - return convert_to_pdf(filename=[input_file.filename], + return convert_to_pdf(filename=input_file.filename, header_filename=header_filename, footer_filename=footer_filename, cmd_options=cmd_options) -- cgit v1.2.3