Step To Reproduce
Steps to reproduce the behavior:
Add 25 unique classes to the Custom CSS Class setting in a field in the Form Editor
Setup a Core template on the form
Attempt to view the PDF
Get memory exhausted error
Expected behavior
The PDF to generate without any errors
Additional context
Per the issue upstream in mPDF, there isn't a simple fix to this problem. The only workaround I can think of at the moment is to try limit the number of CSS classes that are added to a HTML tag.
Description There is a significant memory problem in mPDF when a HTML tag has a lot of classes. To reduce the risk of this occurring in Gravity PDF we should limit the
$field->cssClass
property to a maximum of 10 classes.Step To Reproduce Steps to reproduce the behavior:
Expected behavior The PDF to generate without any errors
Additional context Per the issue upstream in mPDF, there isn't a simple fix to this problem. The only workaround I can think of at the moment is to try limit the number of CSS classes that are added to a HTML tag.