Get Plugin

Templates

Templates & Branding

Easy PDF Invoices for WooCommerce ships with four template variants out of the box. All four are free. You can switch between them from settings, override any variant in your theme, or build your own.

The four variants

Modern (default)

Clean, Stripe-inspired layout. Sans-serif body (DejaVu Sans). Generous spacing. Best for most stores.

  • Logo top-left, document title and number top-right
  • Customer billing/shipping in two columns
  • Product table with subtle horizontal rules
  • Totals right-aligned, accent colour on the grand total
  • Footer with company details

Classic

Formal serif (Times-Roman) for traditional invoicing. Centred title, headed-paper feel.

  • Logo top-centre, company details below
  • Document title centred, large
  • Heavier rules between sections
  • Customer addresses in left/right columns under the title
  • Best for: legal, professional services, B2B

Minimal

Accountant-friendly with monospace numbers (Courier). Hairline rules, single-line top header without a logo.

  • Top line: company name (left), document title and number (right)
  • Hairline border, then customer details
  • Items table with monospace amounts for easy column alignment
  • Best for: accountants, bookkeepers, stores that don't need branding on every receipt

Thermal

80mm-wide POS receipt printer layout. Single column, monospace, compact spacing.

  • Renders at 80mm × 297mm so printers cut at the end of the content
  • Single-column layout, no tables
  • Compact spacing for the smallest possible printout
  • Works for in-store retail receipts, kitchen tickets, pickup slips, and slap-and-ship labels
  • Packing slips in this variant put the ship-to address prominently at the top

Switching variants

  • Go to WooCommerce > Settings > Invoices > Branding.
  • Find the Template variant dropdown.
  • Pick one and save.
The change applies to every document generated from that point forward. Existing PDFs are not regenerated automatically — use the Regenerate action on the order or the bulk regenerate action to refresh past orders.

Branding settings

The Branding tab controls visual elements that apply across all variants.

Company logo

Click Upload logo to open the WordPress media library. The logo appears on every document (except Minimal, which uses text only).

Recommended dimensions: 600×200 pixels at 72dpi. PNG or JPG. The plugin scales it down on the PDF.

Accent colour

The accent colour is used for:

  • Document title underline (Modern)
  • Grand total row background (Modern, Classic)
  • PAID badge background (all variants)
  • Section header underlines (Classic)
Default: #2c3338 (a dark slate). Pick something that matches your brand from the WordPress colour picker.

Footer text

Optional free-text footer that appears on every document. Use it for thank-you notes, return policy summaries, social handles, or anything else.

Plain text only — line breaks are preserved, but HTML is stripped.

QR code on packing slips

Off by default. When enabled:

  • A QR code image appears on every packing slip
  • The encoded payload is the order edit URL (admin-side)
  • Useful for warehouse scanning to jump straight to the order in your dashboard
The QR code is requested from the QR Server API and cached locally for 12 hours. See Compatibility > External services for privacy details.

Overriding templates in your theme

Every variant can be overridden in your theme.

Theme override hierarchy

When the plugin renders a document, it looks for templates in this order:

  • your-theme/easy-pdf-invoices/{variant}/{template}.php — variant-specific override.
  • your-theme/easy-pdf-invoices/{template}.php — generic override (used regardless of variant).
  • Plugin's templates/{variant}/{template}.php if the variant ships an override.
  • Plugin's templates/{template}.php (the Modern default).
So if you want to customise the Classic invoice template only, copy:
easy-pdf-invoices-for-woocommerce/templates/classic/invoice.php
→ your-theme/easy-pdf-invoices/classic/invoice.php

Edit the copied file. Theme overrides survive plugin updates.

Available templates

Each variant has these templates:

  • invoice.php
  • receipt.php
  • credit-note.php
  • packing-slip.php
Plus shared partials in templates/partials/:
  • header.php — logo and document title
  • address-block.php — bill to / ship to columns
  • items-table.php — product line items
  • totals.php — subtotal, tax, shipping, grand total
  • footer.php — company info, legal text
  • paid-badge.php — PAID/REFUNDED badge
You can override partials individually too. The plugin uses TemplateLoader::locate() to resolve every include.

Template context

Inside a template you have access to:

  • $order — the WooCommerce order object (WC_Order).
  • $document — the EPDI document object (Invoice, Receipt, CreditNote, or PackingSlip).
  • $variant — the active variant slug (modern, classic, minimal, thermal).
Use the document object for type-specific data:
echo esc_html( $document->get_title() );        // Invoice / Receipt / Credit Note / Packing Slip
echo esc_html( $document->get_display_number() ); // INV-2026-000042
echo esc_html( $document->get_generated_date() ); // ISO 8601 timestamp

Use the order object for everything else:

echo wc_price( $order->get_total(), array( 'currency' => $order->get_currency() ) );
echo esc_html( $order->get_billing_first_name() );
foreach ( $order->get_items() as $item ) { ... }

Output escaping

Always escape output. The PDF engine doesn't sanitise HTML — anything you echo lands directly in the PDF.

echo esc_html( $value );      // For text content
echo esc_attr( $value );      // For HTML attributes
echo wc_price( $amount );     // For money (returns escaped HTML)

CSS overrides

Each variant has a stylesheet at templates/{variant}/style.css. The plugin reads this with placeholder substitution for {{accent}} (your accent colour from settings).

To override a stylesheet:

  • Copy templates/{variant}/style.css into your theme as easy-pdf-invoices/{variant}/style.css.
  • Edit it.
Or use the epdi_pdf_css filter to modify CSS programmatically:
add_filter( 'epdi_pdf_css', function( $css, $variant, $order ) {
    if ( $variant === 'modern' ) {
        $css .= "\n.invoice-footer { font-size: 9pt; }";
    }
    return $css;
}, 10, 3 );

DOMPDF CSS subset

The PDF engine (DOMPDF) supports a subset of CSS. The bundled stylesheets stick to what works reliably:

  • display: table, display: table-cell, display: inline-block
  • float: left, float: right, clear: both
  • padding, margin in points (pt) or pixels
  • font-family, font-size, font-weight, color
  • background-color, border, border-radius
  • Page breaks via page-break-before, page-break-after
CSS Grid, Flexbox, transforms, and most modern layout features are not supported. If you need a feature DOMPDF doesn't handle, redesign within the supported subset rather than fighting the engine.

Paper size

The Modern, Classic, and Minimal variants render at A4 by default. Stores in the US and Canada get Letter automatically (detected from the WooCommerce store country).

Override per order with the epdi_paper_size filter:

add_filter( 'epdi_paper_size', function( $size, $order ) {
    return 'Letter';
}, 10, 2 );

The Thermal variant always renders at 80mm × 297mm and ignores this filter.

Custom fonts

The bundled DejaVu Sans covers Latin, Cyrillic, and Greek scripts (~95% of WooCommerce stores).

For Arabic, Hebrew, Chinese, Japanese, or Korean, install the upcoming companion plugin Easy PDF Invoices mPDF. It detects RTL or CJK content and swaps DOMPDF for mPDF with the appropriate fonts.

To register a custom font with DOMPDF directly:

add_filter( 'epdi_dompdf_options', function( $options ) {
    $options['fontDir'] = WP_CONTENT_DIR . '/fonts/';
    $options['fontCache'] = WP_CONTENT_DIR . '/fonts/cache/';
    return $options;
} );

Then add @font-face rules in your theme's CSS override.

Building your own variant

To add a fifth variant:

  • Create the directory your-theme/easy-pdf-invoices/{your-variant}/.
  • Copy templates and a style.css into it.
  • Register it via the epdi_template_variants filter:
add_filter( 'epdi_template_variants', function( $variants ) {
    $variants['retro'] = __( 'Retro', 'your-theme' );
    return $variants;
} );

The new variant appears in the Branding dropdown.