Certainly, if you’re creating WooCommerce PDF coupons, you want them to look professional and fully match your brand identity. Therefore, in this article we’ll show you how to add a custom font to your PDF coupon using the Flexible PDF Coupons PRO plugin. In practice, this solution is useful for anyone who wants to go beyond the default options of the WooCommerce coupon editor, while keeping the process simple.
Issue with WooCommerce PDF Coupon Design – the need for branding
At some point, a client contacted us because they were using a plugin that generates WooCommerce PDF coupons. Although the visual editor was convenient, they had two specific requirements:
- First, change the default sans-serif fonts to serif fonts consistent with their branding.
- Second, increase the font size beyond the 72 px limit available in the editor.
Admittedly, the design looked sleek; however, the final PDF differed from the brand guidelines. Interestingly, the client chose two Google Fonts—PlayfairDisplaySC-Regular and League Spartan. Consequently, we proposed a customization that leverages the plugin’s built-in filters, because these filters give full control over coupon styling.
How to customize WooCommerce PDF coupons to fit your brand?
To meet the client’s needs, we implemented two key improvements. As a result, the PDF coupon design was perfectly aligned with the brand’s visual identity. Moreover, the entire change was completed with native tools shipped inside the plugin.
1. Adding a new font to the PDF coupon editor
The first step was to add a custom font to the list of fonts inside the drag-and-drop editor:
add_filter( 'fcpdf/core/editor/fonts', function( $fonts ) {
$fonts['chango'] = [
'name' => 'Chango',
'url' => 'https://fonts.googleapis.com/css2?family=Chango&display=swap',
];
return $fonts;
});
You can easily replace Chango
with PlayfairDisplaySC
or any other Google Font, thus making the process extremely flexible.
2. Integrating the font with the WooCommerce PDF coupon generator (MPDF)
Next, we configured full font support in the PDF generator so that the selected font is embedded in every coupon:
add_filter( 'fcpdf/core/fonts/dir', function ( $dirs ) {
$upload_dir = wp_upload_dir();
$font_dir = trailingslashit( $upload_dir['basedir'] ) . 'fonts';
$dirs[] = $font_dir;
return $dirs;
} );
add_filter( 'fcpdf/core/fonts/data', function ( $fonts ) {
$fonts['chango'] = [
'R' => 'Chango-Regular.ttf',
'I' => 'Chango-Regular.ttf',
'B' => 'Chango-Regular.ttf',
'BI' => 'Chango-Regular.ttf',
];
return $fonts;
});
🛈 Upload the required .ttf
files to wp-content/uploads/fonts/
, so the PDF engine can use them instantly.
Result: visually consistent and on-brand WooCommerce PDF coupons
Because of this customization, the client received a fully branded document. They confirmed that:
- The new font appears in the coupon template editor,
- The generated PDF uses the custom font without issues,
- The final look matches their design guidelines.
Even though the MPDF library currently limits font size to 72 px, the end result still met all expectations and looked highly professional.
Why bother customizing WooCommerce PDF coupons?
The Flexible PDF Coupons PRO plugin offers powerful features that let your store stand out. Moreover, you can produce documents that perfectly reflect your brand and impress customers with attention to detail. Consequently, perceived value increases.
Here’s what you specifically gain:
- Drag-and-drop coupon editor,
- Automatic integration with WooCommerce orders,
- Option to add any Google Font or custom font,
- Customization of text colour and size,
- Flexible PHP filters for advanced scenarios.
📚 Technical documentation:
👉 Flexible PDF Coupons PRO – Documentation
🧪 Try the editor live:
👉 WooCommerce PDF Coupon Editor Demo
💬 Need help?
👉 Contact Flexible Coupons Support
Conclusion
This case clearly demonstrates that WooCommerce PDF coupons can be adapted to the most demanding branding standards. Thanks to the plugin’s flexibility and robust filters, even uncommon requirements—such as embedding brand-specific fonts—can be implemented quickly and effectively.
Ready to achieve a similar result? Then try Flexible PDF Coupons PRO in your WooCommerce store and gain complete control over how your coupons look.
Flexible PDF Coupons PRO WooCommerce £59
Design your own PDF coupons and sell them as gift cards, tickets, or service vouchers. Use extra add-ons and insert your own shortcodes, delay sending coupons by email, or even generate QR codes.
Add to cart or View Details