Print Formats are the layouts that are generated when you want to Print or
Email a transaction like a Sales Invoice. There are two types of Print
Formats,
* The auto-generated “Standard” Print Format: This type of format follows the same layout as the form and is generated automatically by ERPNext.
* Based on the Print Format document. There are templates in HTML that will be rendered with data.
ERPNext comes with a number of pre-defined templates in three styles: Modern,
Classic and Standard.
You can modify the templates or create your own. Editing
ERPNext templates is not allowed because they may be over-written in an
upcoming release.
To create your own versions, open an existing template from:
`Setup > Printing > Print Formats`
Select the type of Print Format you want to edit and click on the “Copy”
button on the right column. A new Print Format will open up with “Is Standard”
set as “No” and you can edit the Print Format.
Editing a Print Format is a long discussion and you will have to know a bit of
HTML, CSS, Python to learn this. For help, please post on our forum.
Print Formats are rendered on the server side using the [Jinja Templating Language](http://jinja.pocoo.org/docs/templates/). All forms have access to the doc object which contains information about the document that is being formatted. You can also access common utilities via the frappe module.
For styling, the [Bootstrap CSS Framework](http://getbootstrap.com/) is provided and you can enjoy the full range of classes.
> Note: Pre-printed stationary is usually not a good idea because your Prints
will look incomplete (inconsistent) when you send them by mail.
#### References
1. [Jinja Templating Language: Reference](http://jinja.pocoo.org/docs/templates/)
2. [Bootstrap CSS Framework](http://getbootstrap.com/)
#### Print Settings
To edit / update your print and PDF settings, go to:
`Setup > Printing and Branding > Print Settings`
#### Example
{% raw %}
Sr | Item Name | Description | Qty | Rate | Amount |
---|---|---|---|---|---|
{{ row.idx }} |
{{ row.item_name }}
{% if row.item_code != row.item_name -%}
Item Code: {{ row.item_code}} {%- endif %} |
{{ row.description }} |
{{ row.qty }} {{ row.uom or row.stock_uom }} | {{ row.get_formatted("rate", doc) }} | {{ row.get_formatted("amount", doc) }} |