diff --git a/frappe/public/js/frappe/form/print.js b/frappe/public/js/frappe/form/print.js index 18a5891f36..0e7e75299a 100644 --- a/frappe/public/js/frappe/form/print.js +++ b/frappe/public/js/frappe/form/print.js @@ -125,9 +125,20 @@ frappe.ui.form.PrintPreview = Class.extend({ var me = this; this.get_print_html(function (out) { me.wrapper.find(".print-format").html(out.html); + me.show_footer(); me.set_style(out.style); }); }, + show_footer: function() { + // footer is hidden by default as reqd by pdf generation + // simple hack to show it in print preview + this.wrapper.find('.print-format').css('position', 'relative'); + this.wrapper.find('#footer-html').attr('style', ` + display: block !important; + position: absolute; + bottom: 0.75in; + `); + }, printit: function () { this.new_page_preview(true); }, diff --git a/frappe/templates/print_formats/pdf_header_footer.html b/frappe/templates/print_formats/pdf_header_footer.html index ed50c3db3b..ca72a990e3 100644 --- a/frappe/templates/print_formats/pdf_header_footer.html +++ b/frappe/templates/print_formats/pdf_header_footer.html @@ -34,6 +34,13 @@ .letter-head-footer { margin-top: -15mm !important; } + + /* Dont show explicit links for tags */ + @media print { + a[href]:after { + content: none; + } + }