So I am trying to generate a pdf using DomPDF using a view. The PDF should be about one page in length, which I would think would not be that big. However, when I try to run it I get a blank page. The logs have the following message:
local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message
'Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes)' in /var/www/domain/vendor/dompdf/dompdf/include/cellmap.cls.php:362
I found the cause of this issue and when I changed it I run into another issue. In /etc/php5/fpm/php.ini there is a setting for max memory and as a default it is set 128M, which is equal to the large number above. Now the script just sits there doing spinning and I set it to print only a small portion of the entire view.
So I did a test this morning and it is appearing that the template that I am using will not work since it uses the head and body tags and uses the styles. If I completely remove the styles it works but otherwise it crashes. Is there some way around this or another laravel package that handles the CSS correctly?