From 7d81356adeca031173efad5edb8390203e3d588c Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sat, 29 Aug 2020 15:10:48 +0200 Subject: check when page finished loading to download --- server/templates/server/download_doc.html | 5 +++++ server/views.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'server') diff --git a/server/templates/server/download_doc.html b/server/templates/server/download_doc.html index 9fe106e..35cbb13 100644 --- a/server/templates/server/download_doc.html +++ b/server/templates/server/download_doc.html @@ -275,4 +275,9 @@ + \ No newline at end of file diff --git a/server/views.py b/server/views.py index cdc1b74..ab22891 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={"window-status":"done"}) result = BytesIO(pdf) result.seek(0) return FileResponse(result, filename=document.user.username+"_"+document.document_type.name+".pdf") -- cgit v1.2.1