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.
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)
#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
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}.phpif the variant ships an override. - Plugin's
templates/{template}.php(the Modern default).
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.phpreceipt.phpcredit-note.phppacking-slip.php
templates/partials/:
header.php— logo and document titleaddress-block.php— bill to / ship to columnsitems-table.php— product line itemstotals.php— subtotal, tax, shipping, grand totalfooter.php— company info, legal textpaid-badge.php— PAID/REFUNDED badge
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, orPackingSlip).$variant— the active variant slug (modern,classic,minimal,thermal).
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.cssinto your theme aseasy-pdf-invoices/{variant}/style.css. - Edit it.
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-blockfloat: left,float: right,clear: bothpadding,marginin points (pt) or pixelsfont-family,font-size,font-weight,colorbackground-color,border,border-radius- Page breaks via
page-break-before,page-break-after
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.cssinto it. - Register it via the
epdi_template_variantsfilter:
add_filter( 'epdi_template_variants', function( $variants ) {
$variants['retro'] = __( 'Retro', 'your-theme' );
return $variants;
} );
The new variant appears in the Branding dropdown.