Ver a proveniência

Merge pull request #4170 from maxtorete/fix_margins

Fixed problem with margin top and bottom overwritten in print format (#3451)
version-14
Rushabh Mehta há 7 anos
committed by GitHub
ascendente
cometimento
556d21d7ca
1 ficheiros alterados com 2 adições e 7 eliminações
  1. +2
    -7
      frappe/utils/pdf.py

+ 2
- 7
frappe/utils/pdf.py Ver ficheiro

@@ -65,6 +65,8 @@ def prepare_options(html, options):
# defaults # defaults
'margin-right': '15mm', 'margin-right': '15mm',
'margin-left': '15mm', 'margin-left': '15mm',
'margin-top': '15mm',
'margin-bottom': '15mm',
}) })


html, html_options = read_options_from_html(html) html, html_options = read_options_from_html(html)
@@ -134,13 +136,6 @@ def prepare_header_footer(soup):
# {"header-html": "/tmp/frappe-pdf-random.html"} # {"header-html": "/tmp/frappe-pdf-random.html"}
options[html_id] = fname options[html_id] = fname


else:
if html_id == "header-html":
options["margin-top"] = "15mm"

elif html_id == "footer-html":
options["margin-bottom"] = "15mm"

return options return options


def cleanup(fname, options): def cleanup(fname, options):


Carregando…
Cancelar
Guardar