diff --git a/frappe/templates/print_format/macros/Markdown.html b/frappe/templates/print_format/macros/Markdown.html
index 7a4b16a3a8..b692283fa0 100644
--- a/frappe/templates/print_format/macros/Markdown.html
+++ b/frappe/templates/print_format/macros/Markdown.html
@@ -1,3 +1,9 @@
-
+{% extends "templates/print_format/macros/Data.html" %}
+
+{%- block value -%}
+
{{ frappe.utils.md_to_html(doc.get(df.fieldname)) }}
+{%- endblock -%}
+
+
diff --git a/frappe/templates/print_format/macros/Rating.html b/frappe/templates/print_format/macros/Rating.html
new file mode 100644
index 0000000000..2e001fb58f
--- /dev/null
+++ b/frappe/templates/print_format/macros/Rating.html
@@ -0,0 +1,22 @@
+{% extends "templates/print_format/macros/Data.html" %}
+
+{% macro star(is_active=false) %}
+
+{% endmacro %}
+
+{%- block value -%}
+
+ {%- for i in range(value) -%}
+ {{ star(true) }}
+ {%- endfor -%}
+ {%- for i in range(5 - value) -%}
+ {{ star() }}
+ {%- endfor -%}
+
+{%- endblock -%}
diff --git a/frappe/templates/print_format/macros/Signature.html b/frappe/templates/print_format/macros/Signature.html
new file mode 100644
index 0000000000..128ff2a927
--- /dev/null
+++ b/frappe/templates/print_format/macros/Signature.html
@@ -0,0 +1,7 @@
+{% extends "templates/print_format/macros/Data.html" %}
+
+{%- block value -%}
+
+

+
+{%- endblock -%}
diff --git a/frappe/templates/print_format/print_format.css b/frappe/templates/print_format/print_format.css
index 41e68e1022..480cd19439 100644
--- a/frappe/templates/print_format/print_format.css
+++ b/frappe/templates/print_format/print_format.css
@@ -76,6 +76,18 @@ body {
font-weight: bold;
}
+.field.left-right {
+ display: flex;
+}
+
+.field.left-right .label {
+ width: 50%;
+}
+
+.field.left-right .value {
+ width: 50%;
+}
+
.child-table [data-fieldtype="Currency"] {
text-align: right;
}
@@ -93,3 +105,27 @@ body {
border-bottom-style: solid;
border-bottom-color: var(--gray-300);
}
+
+.field[data-fieldtype="Rating"] .rating-star {
+ width: 1.5rem;
+}
+
+.field[data-fieldtype="Long Text"] .value, .field[data-fieldtype="Text"] .value {
+ white-space: pre-line;
+}
+
+.field[data-fieldtype="Color"] .value {
+ display: flex;
+ align-items: center;
+}
+
+.field[data-fieldtype="Color"] .color-square {
+ width: 1rem;
+ height: 1rem;
+ margin-right: 0.3rem;
+ border-radius: var(--border-radius);
+}
+
+.field[data-fieldtype="Check"] #icon-tick {
+ width: 1rem;
+}
diff --git a/frappe/utils/weasyprint.py b/frappe/utils/weasyprint.py
index e66747e48a..006bab2dd0 100644
--- a/frappe/utils/weasyprint.py
+++ b/frappe/utils/weasyprint.py
@@ -204,16 +204,13 @@ class PrintFormatGenerator:
return layout
def set_field_renderers(self, layout):
- renderers = {
- "HTML Editor": "HTML",
- "Markdown Editor": "Markdown",
- "Field Template": "FieldTemplate",
- }
+ renderers = {"HTML Editor": "HTML", "Markdown Editor": "Markdown"}
for section in layout["sections"]:
for column in section["columns"]:
for df in column["fields"]:
fieldtype = df["fieldtype"]
- df["renderer"] = renderers.get(fieldtype) or fieldtype
+ renderer_name = fieldtype.replace(" ", "")
+ df["renderer"] = renderers.get(fieldtype) or renderer_name
df["section"] = section
return layout