From 458031811fde626081966ff1120e392a6354788d Mon Sep 17 00:00:00 2001 From: Cannon07 Date: Mon, 27 May 2024 05:53:09 +0530 Subject: [PATCH] Added javascript delay in html_to_pdf conversion --- new-website/utils/tutorials/build_pdf_book.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-website/utils/tutorials/build_pdf_book.py b/new-website/utils/tutorials/build_pdf_book.py index 4fa40634..811232bd 100644 --- a/new-website/utils/tutorials/build_pdf_book.py +++ b/new-website/utils/tutorials/build_pdf_book.py @@ -81,7 +81,7 @@ def html_to_pdf(data_path=DATA_PATH, info_path=INFO_PATH, pdf_path=PDF_PATH): signal.alarm(60) try: print(i, j) - pdfkit.from_file(data_path + j.strip()[:-5] + "html", pdf_path + j.strip()[:-5] + "pdf") + pdfkit.from_file(data_path + j.strip()[:-5] + "html", pdf_path + j.strip()[:-5] + "pdf", options={'javascript-delay':'5000'}) print("Conversion Successful") except Exception as e: print("Exception occured: {}".format(e))