Custom Templates
On this page
Every document type has a built-in template: turn it on from the Templates page (each has an on/off switch) and customize it by toggling fields on and off. Built-ins start off on a new install. Enable the document types you use, or customize and save one to turn it on. A custom template goes further: you control the document's design directly with HTML and CSS, so you can change the layout, drop in your own images, and pull live order data into any spot on the page. Use one whenever the built-in toggles can't express the look you want.
Custom templates exist for all five document types: packing slips, invoices, pick slips, return slips, and gift receipts.
Four ways to create one#
Open Templates in the sidebar, pick the document-type tab you want, then:
Start from a sample (easiest). Click Browse Samples, pick a pre-styled design, and click Download. It's copied into your template list as a custom template you can edit.
Start from scratch. Click the New button for the document type, such as New Packing Slip. Name and edit the template, then choose Create template to save it. You can cancel before creating it.
Import an HTML file. Click Import HTML and choose a .html file from your computer. Its contents load into the editor, ready to save.
Duplicate a template you already have. Click Duplicate on any template, built-in or custom, to get an editable copy. You can copy it into a different document type, which is a quick way to turn a packing slip layout into an invoice.
Using the editor#
The editor has an HTML tab and a CSS tab, with a preview panel you open using Preview. After editing, open Preview again to refresh it with your current draft. Choose Sample, Latest Order, or Order # to check how the design fills in.
- Create template saves a new template. For an existing template, use Save in the save bar or Cmd/Ctrl + S. There's no autosave: your work isn't stored until you save.
- Download turns the current preview into a PDF on your computer, handy for proofing a design before you print for real.
- The editor colors your code and suggests variables as you type. If it feels slow on your computer, turn off Rich template editor in Settings.
- {} Vars opens the variable picker; ? Help opens a reference panel covering variables, conditionals, loops, and the built-in helpers, with copy-paste examples.
Paper sizes#
Every template has a Paper size. It does two jobs. It sets the page your template is drawn on, and it tells the Desktop Utility which of your printers gets the job.
To set it, open the template in its editor and choose from Paper size. The preview redraws at the new size straight away, so you can see whether the layout still fits before you save. Built-in templates print on Letter or A4. For receipts and labels, start from a sample or your own custom template:
| Paper size | Desktop Utility slot |
|---|---|
| Letter (8.5 × 11 in) | Document printer |
| A4 (210 × 297 mm) | Document printer |
| Thermal label (4 × 6 in) | Label printer |
| Receipt (80 mm roll) | Receipt printer |
| Receipt (58 mm roll) | Receipt printer |
You do not pick a printer on the template. You pick the paper, and the matching slot in the Desktop Utility's Printers card decides which printer prints it.
A few things differ by size:
- Orientation is available only for Thermal label (4 × 6 in). Letter and A4 use portrait sheets.
- Receipt (80 mm roll) and Receipt (58 mm roll) have a fixed width and no fixed length. Their printable widths are 72 mm and 48 mm. Both grow in height with the content.
- Changing the paper size of an existing template does not rearrange its layout. Check item titles and totals after switching a custom design to a narrower size. Start with a Roll sample if the layout does not fit.
Starting an 80 mm or 58 mm receipt template#
Open Browse Samples and choose the Receipt filter. Choose Kitchen ticket or Pickup slip under Packing Slip, Sales receipt under Invoice, or Roll under Packing Slip, Invoice, or Gift Receipt. These black-on-white samples use a single column with wrapping item titles. Roll packing slips and gift receipts omit prices; Roll invoices include prices and totals. The same samples work at both widths and start at 80 mm. For a 58 mm roll, open the sample in the editor, choose Receipt (58 mm roll), check the preview, and save. Load the roll that matches your template and set the printer driver to that width.
A4 and 80 mm printing need Desktop Utility 1.10.0 or newer on the Print Station. 58 mm printing needs 1.12.0 or newer. It also needs a printer whose driver offers 58 mm paper. 58 mm and 80 mm rolls cannot be loaded at the same time in one printer. If you use both receipt widths, use one width per Print Station or send jobs to a second Print Station with a Print Rule.
Gift receipt is not receipt paper#
Gift receipt is a document type that hides prices; Receipt (80 mm roll) is a paper size. A gift receipt can use sheet, label, or receipt roll paper.
For automatic tickets, follow Receipts and kitchen tickets.
Save your choice and start a new print. See Printer Troubleshooting for printer assignments and Fit to page.
Pull in order data#
Wrap a variable in double curly braces and Autoprinter fills it in for each order: {{order.name}} prints the order number, and {{shipping_address.formatted}} prints the whole address. Loop over the items with {{#each line_items}} … {{/each}}.
Inside the editor, {} Vars opens a picker you can click to insert. The full list, including helpers for dates, money, barcodes, and QR codes, is in the Template variables reference.
Choose what prints by default#
Click Set Default on a template's card to make it the default for its document type. The default template is used when no Print Rule matches. Use Print Rules to select a different template for specific orders. Template selection does not add the document to your Print Chain; configure the chain separately.
Choose the paper size and orientation that match your printer, and check the preview before printing. For combined chain previews, keep custom CSS under a unique wrapper class, such as .my-invoice, so it does not restyle other documents.
Templates used by rules must be reassigned before removing them. Disabling the last usable template for a document type can also remove that type from your chain, so review the chain after changing template availability.
How many you can have#
Every plan includes unlimited custom templates: Free included. Make as many as you like, for any document type. See the Billing FAQ for what each plan covers.
To control which template a given order actually uses, pair a custom template with a Print Rule.
Need help? Email support@autoprinter.app.