Back to Community

Fixing PDF Layout Issues: Excessive Spacing and Font Problems in WooCommerce Invoices

Content

Are you experiencing strange spacing issues, oversized text, or unusual gaps in your WooCommerce PDF invoices and packing slips? You're not alone. These layout problems are among the most common issues reported by users of the PDF Invoices & Packing Slips for WooCommerce plugin.

Why Do These PDF Layout Issues Occur?

Based on community reports, these problems typically stem from a few common causes:

  • Font installation problems: The plugin uses specific fonts to generate PDFs. When these fonts aren't properly installed or get deleted, the PDF engine substitutes them, causing spacing and layout issues.
  • Server migrations: Moving your site to a new server can disrupt the plugin's font directory.
  • Plugin updates: Occasionally, updates to the underlying PDF engine (DOMPDF) can affect how certain elements are rendered.
  • Cleanup processes: Some server maintenance routines or security plugins may accidentally delete the plugin's temporary files.

How to Fix PDF Spacing and Layout Issues

Solution 1: Reinstall Plugin Fonts (Most Common Fix)

The majority of spacing issues can be resolved by reinstalling the plugin's fonts:

  1. Go to WooCommerce → PDF Invoices → Advanced → Tools
  2. Click the "Reinstall fonts" button
  3. Generate a new PDF to check if the issue is resolved

The plugin performs an automatic daily check for font issues, but manually reinstalling forces an immediate fix.

Solution 2: Enable Font Subsetting for Smaller File Sizes

If your PDF files are unusually large (500kB+), enable font subsetting:

  1. Navigate to WooCommerce → PDF Invoices → General
  2. Enable the "Enable font subsetting" option
  3. Save changes and test a new PDF

This significantly reduces file size by including only the necessary characters rather than entire font sets.

Solution 3: Check for Custom CSS or Template Conflicts

If specific elements have spacing issues:

  • Temporarily switch to the default Simple template under WooCommerce → PDF Invoices → General → Choose a template
  • Disable any custom CSS to identify if your modifications are causing the issue
  • Check if the problem occurs with all products or only specific ones

Solution 4: Verify Image Formats

For logo display issues:

  • Avoid using SVG format, as the PDF engine has limited support for vector images
  • Convert your logo to PNG or JPG format for better compatibility
  • Ensure your logo dimensions are appropriate for the document layout

When These Solutions Might Not Work

If the above steps don't resolve your issue, consider these less common scenarios:

  • The problem might be related to a specific plugin update that introduced layout changes
  • Custom templates may need adjustments after major plugin updates
  • Server configuration might be preventing proper font installation

For persistent issues, it's helpful to provide screenshots comparing the expected vs. actual output using image sharing services like imgbb.com. This visual context can help the community better understand and diagnose unique layout problems.

Most spacing and font issues can be resolved quickly with the font reinstallation tool, making this the recommended first step for any PDF layout problems.

Related Support Threads Support