Преглед на файлове

fix(print): Added properties page-width, page-height (#16045)

version-14
HarryPaulo преди 3 години
committed by GitHub
родител
ревизия
f4518e2cf9
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      frappe/utils/pdf.py

+ 1
- 1
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)


Зареждане…
Отказ
Запис