> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dualentry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create a Custom Template

> Create a custom invoice PDF template in DualEntry by cloning the system template, then edit its tiles, fields, labels, and paper size and save it.

Create a custom template to control how your invoice PDFs look. Every new template starts as a copy of the read-only **System English Letter** template or of another template, so you edit a working layout rather than building from a blank page. A new template isn't applied anywhere, so creating or cloning one never changes an existing invoice.

## Prerequisites

* The `invoice_template:create` and `invoice_template:edit` permissions. The Admin, Accounts Receivable, and Controller roles include both by default. See [User roles and permissions](../../../platform-configuration/user-roles-and-permissions).
* Any invoice [custom fields](../../../platform-configuration/custom-fields) you want on the PDF. Custom fields that apply to invoices appear in the editor automatically.
* A logo file (PNG, JPG, or WebP, up to 1 MB), if the template should use its own logo instead of the company logo.

## Create the template

1. Navigate to **Accounting Setup → Custom Templates**.
2. Choose **New** to start from the system template, or open the row menu on an existing template and choose **Clone**. The editor opens on the new copy.
3. Rename the template in the editor header. Use a name that says where it applies, such as `Netherlands Dutch A4`, so it's easy to pick out when you apply it later.
4. Set the language under **Language and labels** and the paper size above the canvas. See [How to Invoice in Another Language](./how-to-invoice-in-another-language) if you choose Dutch.
5. Under **Branding**, set **Logo source** to **Company** (the company logo, falling back to the organization logo) or **Template** (upload a logo for this template only).
6. Edit the layout, as described in the next section.
7. Choose **Preview** to check the result against a sample invoice, then choose **Save**.

After saving, the template appears on the Custom Templates list with **Applied for** set to **Nothing**. Next, [apply it](./how-to-apply-a-custom-template) to an organization, company, or customer.

## Edit the layout

The canvas is a 12-column grid of tiles, and each tile holds fields. Select a tile to see its controls in the toolbar and right-hand panel. Use these actions to shape the layout:

* **Add a tile**: drag a tile from **Add Tiles** onto the page. Dropping it into empty space creates a new row.
* **Add a field**: select a tile, then choose a field under **Insert Field**, or drag the field into the tile. Search matches field names and the Company, Customer, Invoice, Line Items, and Amounts groups. DualEntry rejects a drop into a tile that can't hold that field.
* **Move a tile**: drag it to another row, or use **Move row up** and **Move row down**. Drag fields within a tile to reorder them.
* **Resize a tile**: drag its left or right edge, or focus the edge and press the Left or Right arrow key. Widths snap to whole grid units, and tiles never overlap.
* **Duplicate, hide, or remove a tile**: use **Duplicate block**, **Hide block**, or **Remove block** in the toolbar.
* **Change a label**: select the label on the canvas and type, or use **Custom labels** under **Language and labels**.
* **Format a field**: set where the value sits relative to its label (**Values on right**, **Values left**, or **Values below**), its text alignment, and its font size.
* **Edit line-item columns**: add, remove, reorder, and resize optional columns. Visible columns always total 12 units.
* **Edit the footer**: add up to three footer cards with **+ Add card** and resize them; their combined width can't exceed 12 units.

See the [Custom Templates Reference](./custom-templates-reference) for every tile, field, and setting.

## Add a Stripe Pay online link

To let customers pay from the PDF, add the **Pay online** field (in the Invoice group) to a **Payment info** tile, a **Button / Link** tile, or a footer card. The link renders only on invoices whose **Payment Information** is set to your Stripe integration; on other invoices the field is hidden. See [Add a Stripe payment link to an invoice](../../../integrations/revenue-and-accounts-receivable/stripe#add-a-stripe-payment-link-to-an-invoice) for the invoice-side setup.

The editor preview uses sample invoice INV-1042 with a placeholder link, so check **Pay online** on a real saved invoice.

## Troubleshooting

**Save fails with "Required fields missing" or "Required columns missing."** Every template must show the invoice **Number**, **Tax**, and **Amount Due** fields, and the line items must include the **Item** and **Amount** columns. Add back whichever the message names, then save again.

**The template saved with "(1)" after its name.** Active template names must be unique, so DualEntry adds a suffix when a name is already taken. Rename this template or the existing one.

**You can't edit or save the template.** It's the system template, which is read-only. Choose **Clone** to make an editable copy.

**You can't archive the template.** A template that's applied to an organization, company, or customer can't be archived. Remove it from each record listed under **Applied for**, then archive it.

**You want to see who changed a template.** Open the template and choose **Activity**. The tab lists create, update, archive, and recover events, and needs the `audit_trail:view` permission.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.