CSS and print

Print Invoice Template Generator

Fill in your business, client and line items to get a clean HTML invoice that prints perfectly on A4 or US Letter. Totals are calculated for you and the CSS handles page size, margins and colours.

Live preview

Runs entirely in your browser. Nothing is uploaded to any server.

Why use an HTML print invoice

Prints cleanly

@page sets the paper size and margins, and print styles remove screen-only extras.

Easy to edit

Plain HTML you can fill from any app, script or template engine.

Save as PDF

Use your browser's print dialog to save a perfect PDF.

How to create a printable invoice

  1. Fill in the detailsYour business, the client, dates, currency and line items.
  2. Set tax and paperAdd tax and discount percentages and choose A4 or US Letter.
  3. Print or copyOpen the print view to print or save as PDF, or copy the template.

CSS that makes invoices print well

The @page rule tells the browser which paper size and margins to use, so the invoice fits the page without the person changing printer settings. In the print media query the card shadow, outer margins and the print button are removed.

Browsers skip background colours when printing to save ink. print-color-adjust: exact asks them to keep the accent colour of the table header and the striped rows. Line items and the notes block use break-inside: avoid so a row is never split across two pages.

Totals

Line amounts, discount and tax are rounded to the currency's decimals.

Paper sizes

A4 is 210 by 297 mm; US Letter is 8.5 by 11 inches.

PDF

Choose "Save as PDF" in the print dialog to email the invoice.

Print invoice template FAQ

How do I turn the invoice into a PDF?

Click "Open print view", press the print button and choose Save as PDF as the printer.

Why are the colours missing when I print?

Some browsers have a "Background graphics" option in the print dialog. Turn it on if colours are still not printed.

Is the tax calculated on the discounted amount?

Yes. The discount is taken off the subtotal first, and tax is calculated on what is left.

Can I add my logo?

Yes. Add an img element inside the inv-head block, before your business name.

Is this a legal invoice?

It is a layout template. Check which details, such as tax numbers or company registration, your country requires on invoices.

Try other print and CSS tools

More free tools from My Panda Toolbox.