diff options
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r-- | wkhtmltopdf/utils.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py index ce32621..7fe432a 100644 --- a/wkhtmltopdf/utils.py +++ b/wkhtmltopdf/utils.py @@ -1,5 +1,6 @@ from __future__ import absolute_import +from copy import copy from itertools import chain from os import fdopen import sys @@ -56,9 +57,11 @@ def wkhtmltopdf(pages, output=None, **kwargs): output = '-' # Default options: - options = { - 'quiet': True, - } + options = getattr(settings, 'WKHTMLTOPDF_CMD_OPTIONS', None) + if options is None: + options = {'quiet': True} + else: + options = copy(options) options.update(kwargs) cmd = getattr(settings, 'WKHTMLTOPDF_CMD', 'wkhtmltopdf') |