Print Formats
Print Formats define how documents appear when they are printed, downloaded as PDFs, or sent via email in ERPNext.
Print Formats are used across various modules, including Sales, Purchase, Manufacturing, Human Resources, Accounting, and more.
Every printable document in ERPNext uses a Print Format to determine its layout, styling, and displayed information.
Types of Print Formats
ERPNext supports three types of Print Formats:
- Standard Print Format
- Custom Print Format
- HTML Print Format
1. Standard Print Format
Every printable DocType includes a built-in Standard Print Format that is automatically generated by the Frappe Framework.
The layout follows the arrangement of fields in the document, making it suitable for most business requirements without additional customization.
If you need to modify the fields displayed in the Standard Print Format, you can do so using Customize Form.
Standard Print Formats cannot be edited directly. Layout changes are made through Customize Form.
2. Custom Print Format
Custom Print Formats allow you to design document layouts without writing code by using the Print Format Builder.
The builder provides a drag-and-drop interface where you can rearrange fields, add custom text, and create layouts that match your organization’s requirements.
ERPNext includes several predefined design styles, including:
- Modern
- Monochrome
- Classic
You can use these templates as a starting point and customize them further.
3. HTML Print Format
HTML Print Formats provide complete control over document appearance using HTML, CSS, Bootstrap classes, Jinja templating, and Python expressions.
This approach is suitable when highly customized layouts or complex business documents are required.
HTML Print Formats are recommended when standard layouts or the Print Format Builder cannot meet your design requirements.
Jinja Templating
ERPNext uses the Jinja Templating Language to dynamically insert document data into HTML Print Formats.
The current document is available through the doc object, allowing you to access field values, child tables, formatted data, and utility functions.
Common capabilities include:
- Displaying document fields.
- Looping through child table records.
- Formatting dates, currency, and numbers.
- Adding conditional content.
- Supporting multilingual translations.
Formatting Values
To display properly formatted values such as dates and currencies, use:
{{ doc.get_formatted("fieldname") }}
For translated text, use:
{{ _("Translated Text") }}
Bootstrap Support
HTML Print Formats include Bootstrap CSS, allowing you to build responsive and professionally formatted document layouts using Bootstrap components and utility classes.
Print Settings
Global printing preferences such as PDF generation, paper size, and default print behavior can be managed from:
Home → Settings → Print Settings
Common Use Cases
- Sales Invoices
- Purchase Orders
- Quotations
- Delivery Notes
- Salary Slips
- Payment Entries
- Manufacturing Documents
- HR Documents
Benefits of Print Formats
- Standardizes printed business documents.
- Supports PDF generation and email attachments.
- Allows both no-code and code-based customization.
- Supports dynamic data using Jinja templates.
- Provides Bootstrap styling for professional layouts.
- Can be tailored to match organizational branding and compliance requirements.
Best Practices
- Use the Standard Print Format for simple printing requirements.
- Choose the Print Format Builder for quick layout customization without coding.
- Use HTML Print Formats for advanced layouts and business-specific formatting.
- Use
doc.get_formatted()to display properly formatted dates, currencies, and numbers. - Keep layouts clean and consistent to improve document readability.