diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 14:11:21 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 14:11:21 +0200 |
commit | d0c76c4fa3c03e4fbb3855621516f1338d52d998 (patch) | |
tree | 4452a7706000f5e238b54963d44e6d715fc25c7e /server | |
parent | even simpler doc preview (diff) | |
download | scout-subs-d0c76c4fa3c03e4fbb3855621516f1338d52d998.tar.gz scout-subs-d0c76c4fa3c03e4fbb3855621516f1338d52d998.zip |
wait to render pdf for js to load
Diffstat (limited to 'server')
-rw-r--r-- | server/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/views.py b/server/views.py index 26d5b2a..b5e0493 100644 --- a/server/views.py +++ b/server/views.py @@ -221,7 +221,7 @@ def ulist(request): # render context html = template.render(context) # render pdf using wkhtmltopdf - pdf = pdfkit.from_string(html, False) + pdf = pdfkit.from_string(html, False, options={'javascript-delay':'1000'}) result = BytesIO(pdf) result.seek(0) @@ -602,7 +602,7 @@ def doclist(request): context = {'doc': doc, 'vac': vac_file, 'health': health_file, 'sign_doc_file': sign_doc_file} html = template.render(context) - pdf = pdfkit.from_string(html, False) + pdf = pdfkit.from_string(html, False, options={'javascript-delay':'1000'}) result = BytesIO(pdf) result.seek(0) |