Skip to content

Commit

Permalink
Added javascript delay in html_to_pdf conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Cannon07 committed May 27, 2024
1 parent 1cdf42b commit 4580318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion new-website/utils/tutorials/build_pdf_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4580318

Please sign in to comment.