From f4518e2cf9d8bdb952dd82160ff0fb8cf9eab792 Mon Sep 17 00:00:00 2001 From: HarryPaulo Date: Wed, 23 Feb 2022 05:19:40 -0300 Subject: [PATCH] fix(print): Added properties page-width, page-height (#16045) --- frappe/utils/pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index 9a7c0889b5..b8e684869e 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.py @@ -155,7 +155,7 @@ def read_options_from_html(html): toggle_visible_pdf(soup) # use regex instead of soup-parser - for attr in ("margin-top", "margin-bottom", "margin-left", "margin-right", "page-size", "header-spacing", "orientation"): + for attr in ("margin-top", "margin-bottom", "margin-left", "margin-right", "page-size", "header-spacing", "orientation", "page-width", "page-height"): try: pattern = re.compile(r"(\.print-format)([\S|\s][^}]*?)(" + str(attr) + r":)(.+)(mm;)") match = pattern.findall(html)