Resolving Font Issues

To keep the PDF Generator Extensions installation zip as small as possible a number of fonts had to omitted from the included mPDF package, font files can be extremely large. 

If you find that the generated PDF is missing some characters or the file won't generate it is most likely due to a missing font. You may find a note in the entry timeline like this:

Error: Unable to generate PDF. mPDF Error - cannot find TTF TrueType font file - /app/public/wp-content/plugins/gravityflowpdf/includes/mpdf/ttfonts/Sun-ExtA.ttf

To resolve this issue you can create a custom fonts directory in another location, such as the wp-content directory. The missing font file(s) which can be downloaded from the  mPDF GitHub repository can then be added to your custom fonts directory. Using a custom fonts directory outside the plugins directory ensures your changes will not be lost during plugin updates.

For issues with Chinese, Japanese, and Korean languages you would need the  Sun-ExtA.ttf file.

Once you have added the missing font(s) to a custom location you can then instruct mPDF to use those fonts by adding the following line to the sites wp-config.php file.

define( '_MPDF_SYSTEM_TTFONTS', dirname(__FILE__) . '/wp-content/folder_name_here/' );

With the missing font(s) added to a custom directory and the _MPDF_SYSTEM_TTFONTS constant defined you can then restart the step to generate the PDF and continue the workflow.

Still need help? Contact Support Contact Support