Emoji breaking PDF output [RESOLVED]

Hello, I am using Gravity Forms with the Gravity PDF add-on.

We have a form with a text comment box that gets emailed as a PDF attachment with the admin notification.

Recently we have had an issue with this form where it did not attach, and I couldn’t view the PDF from the dashboard. The error message is Cannot find TTF TrueType font file "Sun-ExtA.ttf" in configured font directories. in /var/www/wp-content/plugins/gravity-forms-pdf-extended/vendor_prefixed/mpdf/mpdf/src/Fonts/FontFileFinder.php on line 27

The common theme between the entries that give the error is that users are typing Emojis in their comment text box. My workaround right now is to add instructions to NOT use emoji, but I would like a better solution.

Is there a simple way to disable the use of Emojis in the text boxes? Or, is there something I am missing in the settings to enable Emojis within the PDF? I am using the Core Zadani template and Deja Vu Condensed font for the PDF settings. I tried a different font and got the same result. I have not tested a different template.

Thanks.

Hi Kathryn. I recommend checking with Gravity PDF support first to see if they have a workaround. If not, there is probably a way to strip out or prevent emoji in textareas. Let us know what Gravity PDF says about the issue. Thank you.

Thank you Chris! I apologize, I didn’t realize that add-on was from a separate company.

Just FYI and for anyone that comes across this post looking for an answer: I needed to install the Core Fonts for Gravity PDF, which has fixed the error. This is where I found the answer.

1 Like