diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index f465ca3979..8c33022191 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.py @@ -72,7 +72,7 @@ def prepare_options(html, options): def read_options_from_html(html): options = {} - soup = BeautifulSoup(html, "html.parser") + soup = BeautifulSoup(html, "html5lib") # extract pdfkit options from html for html_id in ("margin-top", "margin-bottom", "margin-left", "margin-right", "page-size"):