diff --git a/frappe/printing/page/print/print.js b/frappe/printing/page/print/print.js index 4dc8382698..8dfffa18c0 100644 --- a/frappe/printing/page/print/print.js +++ b/frappe/printing/page/print/print.js @@ -452,6 +452,7 @@ frappe.ui.form.PrintView = class { ` display: block !important; order: 1; + margin-top: auto; ` ); } diff --git a/frappe/printing/print_style/redesign/redesign.json b/frappe/printing/print_style/redesign/redesign.json index c033baca91..747bc1b28e 100644 --- a/frappe/printing/print_style/redesign/redesign.json +++ b/frappe/printing/print_style/redesign/redesign.json @@ -1,11 +1,11 @@ { "creation": "2020-10-22 00:00:08.161999", - "css": ".print-format {\n font-size: 13px;\n background: white;\n}\n\n.print-heading {\n border-bottom: 1px solid #E2E6E9;\n padding-bottom: 10px;\n margin-bottom: 20px;\n}\n\n.print-heading h2 {\n font-size: 24px;\n}\n\n.print-heading h2 div {\n margin-bottom: 10px;\n text-transform: uppercase;\n}\n\n.print-heading small {\n font-size: 14px !important;\n font-weight: normal;\n color: #74808B;\n}\n\n.print-format .letter-head {\n margin-bottom: 30px;\n}\n\n.print-format label {\n font-weight: normal;\n font-size: 13px;\n color: #4C5A67;\n}\n\n.print-format .data-field {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.print-format .value {\n color: #192734;\n}\n\n.print-format .section-break {\n margin-bottom: 15px;\n}\n\n.print-format .row {\n line-height: 2;\n margin-top: 5px !important;\n}\n\n.print-format .important .value {\n font-size: 13px;\n font-weight: bold;\n}\n\n.print-format th {\n color: #74808b;\n font-weight: normal;\n border-bottom-width: 1px !important;\n}\n\n.print-format .table-bordered td, .print-format .table-bordered th {\n border: 1px solid #E2E6E9;\n}\n\n.print-format .table-bordered {\n border: 1px solid #E2E6E9;\n}\n\n.print-format td, .print-format th {\n padding: 10px !important;\n}\n\n.print-format .primary.compact-item {\n font-weight: normal;\n}\n", + "css": ".print-format {\n font-size: 13px;\n background: white;\n}\n\n.print-heading {\n border-bottom: 1px solid #E2E6E9;\n padding-bottom: 10px;\n margin-bottom: 20px;\n}\n\n.print-heading h2 {\n font-size: 24px;\n}\n\n.print-heading h2 div {\n margin-bottom: 10px;\n text-transform: uppercase;\n}\n\n.print-heading small {\n font-size: 14px !important;\n font-weight: normal;\n color: #74808B;\n}\n\n.print-format .letter-head {\n margin-bottom: 30px;\n}\n\n.print-format label {\n font-weight: normal;\n font-size: 13px;\n color: #4C5A67;\n}\n\n.print-format .data-field {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.print-format .value {\n color: #192734;\n}\n\n.print-format .section-break:not(:last-child) {\n margin-bottom: 15px;\n}\n\n.print-format .row {\n line-height: 2;\n margin-top: 5px !important;\n}\n\n.print-format .important .value {\n font-size: 13px;\n font-weight: bold;\n}\n\n.print-format th {\n color: #74808b;\n font-weight: normal;\n border-bottom-width: 1px !important;\n}\n\n.print-format .table-bordered td, .print-format .table-bordered th {\n border: 1px solid #E2E6E9;\n}\n\n.print-format .table-bordered {\n border: 1px solid #E2E6E9;\n}\n\n.print-format td, .print-format th {\n padding: 10px !important;\n}\n\n.print-format .primary.compact-item {\n font-weight: normal;\n}\n", "disabled": 0, "docstatus": 0, "doctype": "Print Style", "idx": 0, - "modified": "2020-11-23 13:51:06.148203", + "modified": "2020-11-24 12:28:13.229178", "modified_by": "Administrator", "name": "Redesign", "owner": "Administrator", diff --git a/frappe/utils/pdf.py b/frappe/utils/pdf.py index 2c895911cc..6ad2ac535d 100644 --- a/frappe/utils/pdf.py +++ b/frappe/utils/pdf.py @@ -178,6 +178,7 @@ def prepare_header_footer(soup): html = frappe.render_template("templates/print_formats/pdf_header_footer.html", { "head": head, "content": content, + "styles": styles, "html_id": html_id, "css": css })